home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2003 June / macformat-130.iso / mac / Reviewed⁄Demos / Spearhead Demo / demota / pak1.pk3 / global / mike_Torso.st < prev    next >
Encoding:
Text File  |  2002-10-28  |  65.0 KB  |  3,001 lines

  1.     // ======================================================= //
  2.     // Action state machine for Mike Powell, the hero of MoH PC //
  3.     // ======================================================= //
  4.  
  5. // Authored by Carl glave and Michael Boon, 5-23-2000
  6.  
  7. // The action state machine takes care of
  8. // a) all torso-only animations which are layer on top of leg animations
  9. // b) most full-body animations
  10. // c) which states are to take their full-body animations from the leg state
  11. //    machine.
  12. // The states which control only torso animations have "movetype legs" and 
  13. // animations under the token "action".  This allows the leg state to continue
  14. // controlling the leg animations.  The states which control the whole body have
  15. // movetype not legs and animations under the token "action". This overrides the
  16. // leg state machine. States such as STAND, below, which have "none" specified
  17. // as the torso animation, take the torso animation from the leg animaiton
  18. // specified in the legs state machine.
  19.  
  20. //==============================================================================
  21. //==============================================================================
  22. //
  23. // Stand (really means not doing an action)
  24. //
  25. //==============================================================================
  26.  
  27. state STAND
  28. {
  29.     movetype legs
  30.  
  31.     camera behind
  32.  
  33.     entrycommands
  34.     {
  35.         viewmodelanim idle
  36.     }
  37.     
  38.     action
  39.     {
  40.         none : default // no torso animation
  41.     }
  42.  
  43.     states
  44.     {
  45.         KILLED                : KILLED
  46.  
  47.         VEHICLE_START            : IS_USING_VEHICLE
  48.         TURRET_START            : IS_USING_TURRET
  49.  
  50.         // if we're on a ladder, make sure we're climbing the ladder
  51.         LADDER_IDLE_LEFT        : ON_LADDER
  52.  
  53.         // Some grab and hang stuff will be implemented in the final game, probably 
  54.         // not all of this, but it's in here as a placeholder.
  55. //        CLIMB_LADDER            : ONGROUND +FORWARD !BACKWARD AT_LADDER
  56.  
  57. //        CLIMB_LADDER_IMPACT        : !ONGROUND FORWARD !BACKWARD AT_LADDER    // For grabbing onto walls when
  58.                                                     // flying through the air
  59.     
  60.         // Using objects is dictated by the object being used.  The three objects 
  61.         // here are for objects which trigger interactive actions when touched, 
  62.         // for objects which the player uses (such as doors), and for when the 
  63.         // player tries to use an object that is not usable.
  64. //        USE_USEANIM                : ONGROUND TOUCHEDUSEANIM
  65. //        USE_USEANIM                : ONGROUND USE AT_USEANIM
  66.         USE_LADDER                : ONGROUND +USE AT_LADDER CHECK_HEIGHT "stand"
  67. //        USE_LADDER                : ONGROUND AT_LADDER // this is full auto use of ladders
  68.         // latch onto ladder in mid-air
  69.         USE_LADDER                : +USE AT_LADDER CHECK_HEIGHT "stand" // can also latch onto a ladder in mid-air
  70.         // auto use of ladder when at the bottom (AT_LADDER check is last because it does a trace)
  71.         USE_LADDER                : ONGROUND FORWARD LOOKING_UP "35" !PUTAWAYMAIN !NEW_WEAPON !RELOAD !ATTACK_PRIMARY !ATTACK_SECONDARY AT_LADDER CHECK_HEIGHT "stand"
  72.         // auto use of ladder when at the top (AT_LADDER check is last because it does a trace)
  73.         USE_LADDER                : ONGROUND FORWARD !LOOKING_UP "-35" !PUTAWAYMAIN !NEW_WEAPON !RELOAD !ATTACK_PRIMARY !ATTACK_SECONDARY AT_LADDER CHECK_HEIGHT "stand"
  74. //        GENERIC_USE                : ONGROUND +USE
  75.  
  76.         // This is not functional for the prototype, but is here as a placeholder for
  77.         // future functionality.
  78.         // While the player can only fire weapons with his right hand, he can switch them 
  79.         // to his left if he wants to use an item with his left.  Gameplay-wise, this should 
  80.         // be the same as putting the weapon away, but it will create a nice graphical "cool 
  81.         // factor" which is always good in computer games.
  82.         // When we have two items out, the game code will flag them both as putaway, and we 
  83.         // need to put the right one away first, followed by the left.
  84.         PUTAWAY_MAIN            : PUTAWAYMAIN    // Basic put weapon away move.
  85.         RAISE_WEAPON            : NEW_WEAPON
  86.  
  87.         RELOAD_WEAPON            : RELOAD
  88.     
  89.         CHECK_MORTARRIFLE           : +ATTACK_PRIMARY IS_WEAPON_ACTIVE "mainhand" "Gewehrgranate"        
  90.         CHECK_PRIMARY_ATTACK_SEMIAUTO    : +ATTACK_PRIMARY IS_WEAPON_SEMIAUTO "mainhand" IS_WEAPON_READY_TO_FIRE "mainhand"
  91.         CHECK_PRIMARY_ATTACK_FULLAUTO    : ATTACK_PRIMARY !IS_WEAPON_SEMIAUTO "mainhand" IS_WEAPON_READY_TO_FIRE "mainhand"
  92.         CHECK_SECONDARY_ATTACK            : +ATTACK_SECONDARY
  93.  
  94.         // check for needing to restart the STAND state so that we can select a different 
  95.         // viewmodel anim (part of the viewmodel idle anim setting code)
  96.         STAND    : +CHECK_MOVEMENT_SPEED "mainhand"
  97.         STAND    : -CHECK_MOVEMENT_SPEED "mainhand"
  98.     }
  99. }
  100.  
  101. //==============================================================================
  102. //==============================================================================
  103. //
  104. // Primary Attacks - Full Auto
  105. //
  106. //==============================================================================
  107.  
  108. state CHECK_PRIMARY_ATTACK_FULLAUTO
  109. {
  110.     movetype legs
  111.  
  112.     action
  113.     {
  114.         none : default // stop torso animation
  115.     }
  116.  
  117.     states
  118.     {
  119.         STAND                    : KILLED
  120.     
  121.         STAND                    : NEW_WEAPON
  122.         STAND                    : RELOAD
  123.         STAND                    : !IS_WEAPON_READY_TO_FIRE "mainhand"
  124.         
  125. //        ATTACK_PISTOL_PRIMARY    : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "pistol"
  126. //        ATTACK_RIFLE_PRIMARY    : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "rifle"
  127. //        CHARGE_ATTACK_GRENADE    : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "grenade"
  128.         ATTACK_SMG_PRIMARY        : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "smg"
  129.         ATTACK_MG_PRIMARY        : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "mg"
  130. //        ATTACK_ITEM_PRIMARY        : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "item"
  131.         
  132. //        STAND                    : IS_WEAPON_ACTIVE "Error" // Generates an error if no appropriate
  133.                                                             // attack state is chosen
  134.         STAND                    : !ATTACK_PRIMARY
  135.     }
  136. }
  137.  
  138. state ATTACK_SMG_PRIMARY
  139. {
  140.     movetype legs
  141.  
  142.     entrycommands
  143.     {
  144.         viewmodelanim fire 1
  145.     }
  146.  
  147.     action
  148.     {
  149.         mp40_stand_run_fire        : IS_WEAPON_ACTIVE "mainhand" "MP40" POSITION_TYPE "standing" MOVEMENT_TYPE "running"
  150.         mp40_crouch_run_fire    : IS_WEAPON_ACTIVE "mainhand" "MP40" POSITION_TYPE "crouching" MOVEMENT_TYPE "running"
  151.         mp40_crouch_fire        : IS_WEAPON_ACTIVE "mainhand" "MP40" POSITION_TYPE "crouching"
  152.         mp40_stand_fire            : IS_WEAPON_ACTIVE "mainhand" "MP40"
  153.  
  154.         sten_stand_run_fire        : IS_WEAPON_ACTIVE "mainhand" "Sten Mark II" POSITION_TYPE "standing" MOVEMENT_TYPE "running"
  155.         sten_crouch_run_fire    : IS_WEAPON_ACTIVE "mainhand" "Sten Mark II" POSITION_TYPE "crouching" MOVEMENT_TYPE "running"
  156.         sten_crouch_fire        : IS_WEAPON_ACTIVE "mainhand" "Sten Mark II" POSITION_TYPE "crouching"
  157.         sten_stand_fire            : IS_WEAPON_ACTIVE "mainhand" "Sten Mark II"
  158.  
  159.         smg_stand_run_fire        : POSITION_TYPE "standing" MOVEMENT_TYPE "running"
  160.         smg_crouch_run_fire        : POSITION_TYPE "crouching" MOVEMENT_TYPE "running"
  161.         smg_crouch_fire            : POSITION_TYPE "crouching"
  162.         smg_stand_fire            : default
  163.     }
  164.  
  165.     states
  166.     {
  167.         STAND                            : KILLED
  168.  
  169.         STAND                            : !ATTACK_PRIMARY ANIMDONE_TORSO 
  170.         STAND                            : ANIMDONE_TORSO !IS_WEAPON_READY_TO_FIRE "mainhand"
  171. //        STAND                            : RELOAD !ATTACK_PRIMARY IS_WEAPON_READY_TO_FIRE "mainhand"
  172.         STAND                            : RELOAD !ATTACK_PRIMARY
  173. //        STAND                            : RELOAD !HAS_AMMO_IN_CLIP "mainhand" IS_WEAPON_READY_TO_FIRE "mainhand"
  174.         
  175.         CHECK_PRIMARY_ATTACK_FULLAUTO    : ATTACK_PRIMARY +IS_WEAPON_READY_TO_FIRE "mainhand"
  176.         CHECK_PRIMARY_ATTACK_FULLAUTO    : +ATTACK_PRIMARY IS_WEAPON_READY_TO_FIRE "mainhand"
  177.     }
  178. }
  179.  
  180. state ATTACK_MG_PRIMARY
  181. {
  182.     movetype legs
  183.  
  184.     entrycommands
  185.     {
  186.         viewmodelanim fire 1
  187.     }
  188.  
  189.     action
  190.     {
  191.         mp44_stand_run_fire        : IS_WEAPON_ACTIVE "mainhand" "StG 44" POSITION_TYPE "standing" MOVEMENT_TYPE "running"
  192.         mp44_crouch_run_fire    : IS_WEAPON_ACTIVE "mainhand" "StG 44" POSITION_TYPE "crouching" MOVEMENT_TYPE "running"
  193.         mp44_crouch_fire        : IS_WEAPON_ACTIVE "mainhand" "StG 44" POSITION_TYPE "crouching"
  194.         mp44_stand_fire            : IS_WEAPON_ACTIVE "mainhand" "StG 44"
  195.  
  196.         mg_stand_run_fire        : POSITION_TYPE "standing" MOVEMENT_TYPE "running"
  197.         mg_crouch_run_fire        : POSITION_TYPE "crouching" MOVEMENT_TYPE "running"
  198.         mg_crouch_fire            : POSITION_TYPE "crouching"
  199.         mg_stand_fire            : default
  200.     }
  201.  
  202.     states
  203.     {
  204.         STAND                            : KILLED
  205.  
  206. //        STAND                            : !ATTACK_PRIMARY ANIMDONE_TORSO 
  207. //        STAND                            : RELOAD !ATTACK_PRIMARY IS_WEAPON_READY_TO_FIRE "mainhand"
  208.     
  209.         STAND                            : !ATTACK_PRIMARY ANIMDONE_TORSO 
  210.         STAND                            : ANIMDONE_TORSO !IS_WEAPON_READY_TO_FIRE "mainhand"
  211. //        STAND                            : RELOAD !ATTACK_PRIMARY IS_WEAPON_READY_TO_FIRE "mainhand"
  212.         STAND                            : RELOAD !ATTACK_PRIMARY
  213. //        STAND                            : RELOAD !HAS_AMMO_IN_CLIP "mainhand" IS_WEAPON_READY_TO_FIRE "mainhand"
  214.         
  215.         CHECK_PRIMARY_ATTACK_FULLAUTO    : ATTACK_PRIMARY +IS_WEAPON_READY_TO_FIRE "mainhand"
  216.         CHECK_PRIMARY_ATTACK_FULLAUTO    : +ATTACK_PRIMARY IS_WEAPON_READY_TO_FIRE "mainhand"
  217.     }
  218. }
  219.  
  220. //==============================================================================
  221. //==============================================================================
  222. //
  223. // Primary Attacks - Semi-Auto
  224. //
  225. //==============================================================================
  226.  
  227. state CHECK_PRIMARY_ATTACK_SEMIAUTO
  228. {
  229.     movetype legs
  230.  
  231.     action
  232.     {
  233.         none : default // stop torso animation
  234.     }
  235.  
  236.     states
  237.     {
  238.         STAND                    : KILLED
  239.     
  240.         STAND                    : NEW_WEAPON
  241.         STAND                    : RELOAD
  242.         STAND                    : !IS_WEAPON_READY_TO_FIRE "mainhand"
  243.  
  244.         ATTACK_PISTOL_PRIMARY    : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "pistol"
  245.         ATTACK_RIFLE_PRIMARY    : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "rifle"
  246.         CHARGE_ATTACK_GRENADE    : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "grenade"
  247.         ATTACK_ITEM_PRIMARY        : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "item"
  248.         ATTACK_BAZOOKA_PRIMARY    : IS_WEAPON_ACTIVE "mainhand" "Bazooka"
  249.         ATTACK_BAZOOKA_PRIMARY    : IS_WEAPON_ACTIVE "mainhand" "Panzerschreck"
  250.         ATTACK_SHOTGUN_PRIMARY    : IS_WEAPON_ACTIVE "mainhand" "Shotgun"
  251.     
  252. //        STAND                    : IS_WEAPON_ACTIVE "Error" // Generates an error if no appropriate
  253.                                             // attack state is chosen
  254.         STAND                    : !ATTACK_PRIMARY
  255.     }
  256. }
  257.  
  258. state ATTACK_RIFLE_PRIMARY
  259. {
  260.     movetype legs
  261.  
  262.     entrycommands
  263.     {
  264.         viewmodelanim fire 1
  265.     }
  266.  
  267.     action
  268.     {
  269.         // Fire from the hip when jogging,
  270.         // from the shoulder when walking or standing
  271.         rifle_stand_run_fire    : POSITION_TYPE "standing" MOVEMENT_TYPE "running"
  272.         rifle_crouch_run_fire    : POSITION_TYPE "crouching" MOVEMENT_TYPE "running"
  273.         rifle_stand_walk_fire    : POSITION_TYPE "standing" MOVEMENT_TYPE "walking"
  274.         rifle_crouch_fire        : POSITION_TYPE "crouching"
  275.         rifle_stand_fire        : default
  276.     }
  277.  
  278.     states
  279.     {
  280.         STAND                            : KILLED
  281.  
  282. //        STAND                            : !ATTACK_PRIMARY ANIMDONE_TORSO 
  283.         ATTACK_SPRINGFIELD_RECHAMBER    : ANIMDONE_TORSO IS_WEAPON_ACTIVE "mainhand" "Springfield '03 Sniper"
  284.  
  285.         ATTACK_RIFLE_RECHAMBER            : ANIMDONE_TORSO IS_WEAPON_ACTIVE "mainhand" "Gewehrgranate"
  286.         ATTACK_RIFLE_RECHAMBER            : ANIMDONE_TORSO IS_WEAPON_ACTIVE "mainhand" "Mauser KAR 98K"
  287.         ATTACK_RIFLE_RECHAMBER            : ANIMDONE_TORSO IS_WEAPON_ACTIVE "mainhand" "KAR98 - Sniper"
  288.         ATTACK_RIFLE_RECHAMBER            : ANIMDONE_TORSO IS_WEAPON_ACTIVE "mainhand" "Mosin Nagant Rifle"
  289.         ATTACK_RIFLE_RECHAMBER            : ANIMDONE_TORSO IS_WEAPON_ACTIVE "mainhand" "Lee-Enfield"
  290.         STAND                            : ANIMDONE_TORSO 
  291.         CHECK_PRIMARY_ATTACK_SEMIAUTO    : +ATTACK_PRIMARY IS_WEAPON_READY_TO_FIRE "mainhand"
  292.     }
  293. }
  294.  
  295. state ATTACK_SPRINGFIELD_RECHAMBER
  296. {
  297.     movetype legs
  298.     
  299.     entrycommands
  300.     {
  301.         viewmodelanim rechamber
  302. //        safezoom 0
  303.     }
  304.     
  305. //    exitcommands
  306. //    {
  307. //        safezoom 1
  308. //    }
  309.     
  310.     action
  311.     {
  312.         springfield_crouch_rechamber    : POSITION_TYPE "crouching"
  313.         springfield_stand_rechamber        : default
  314.     }
  315.     
  316.     states
  317.     {
  318.         STAND                            : KILLED
  319.     
  320.         STAND                            : ANIMDONE_TORSO 
  321.     }
  322. }
  323.  
  324. state ATTACK_RIFLE_RECHAMBER
  325. {
  326.     movetype legs
  327.     
  328.     entrycommands
  329.     {
  330.         viewmodelanim rechamber
  331. //        safezoom 0
  332.     }
  333.     
  334. //    exitcommands
  335. //    {
  336. //        safezoom 1
  337. //    }
  338.     
  339.     action
  340.     {
  341.         enfield_crouch_rechamber    : POSITION_TYPE "crouching" IS_WEAPON_ACTIVE "mainhand" "Lee-Enfield"
  342.         enfield_stand_rechamber        : IS_WEAPON_ACTIVE "mainhand" "Lee-Enfield"
  343.  
  344.         mosin_crouch_rechamber    : POSITION_TYPE "crouching" IS_WEAPON_ACTIVE "mainhand" "Mosin Nagant Rifle"
  345.         mosin_stand_rechamber        : IS_WEAPON_ACTIVE "mainhand" "Mosin Nagant Rifle"
  346.  
  347.         svt_crouch_rechamber        : POSITION_TYPE "crouching" IS_WEAPON_ACTIVE "mainhand" "SVT 40"
  348.         svt_stand_rechamber        : IS_WEAPON_ACTIVE "mainhand" "SVT 40"
  349.  
  350.         kar98_crouch_rechamber        : POSITION_TYPE "crouching"
  351.         kar98_stand_rechamber        : default
  352.     }
  353.     
  354.     states
  355.     {
  356.         STAND                        : KILLED
  357.     
  358.         STAND                        : ANIMDONE_TORSO 
  359.     }
  360. }
  361.  
  362. state ATTACK_PISTOL_PRIMARY
  363. {
  364.     movetype legs
  365.  
  366.     entrycommands
  367.     {
  368.         viewmodelanim fire 1
  369.     }
  370.  
  371.     action
  372.     {
  373.         // Fire from the hip when jogging, from the shoulder when
  374.         // walking, or standing
  375.  
  376.         pistol_silenced_stand_run_fire    : POSITION_TYPE "standing" MOVEMENT_TYPE "running" IS_WEAPON_ACTIVE "mainhand" "Hi-Standard Silenced"
  377.         pistol_silenced_crouch_run_fire    : POSITION_TYPE "crouching" MOVEMENT_TYPE "running" IS_WEAPON_ACTIVE "mainhand" "Hi-Standard Silenced"
  378.         pistol_silenced_crouch_fire        : POSITION_TYPE "crouching" IS_WEAPON_ACTIVE "mainhand" "Hi-Standard Silenced"
  379.         pistol_silenced_stand_fire        : IS_WEAPON_ACTIVE "mainhand" "Hi-Standard Silenced"
  380.  
  381.         pistol_stand_run_fire    : POSITION_TYPE "standing" MOVEMENT_TYPE "running"
  382.         pistol_crouch_run_fire    : POSITION_TYPE "crouching" MOVEMENT_TYPE "running"
  383.         pistol_crouch_fire        : POSITION_TYPE "crouching"
  384.         pistol_stand_fire        : default
  385.     }
  386.  
  387.     states
  388.     {
  389.         STAND                            : KILLED
  390.  
  391. //        STAND                            : !ATTACK_PRIMARY ANIMDONE_TORSO 
  392.         STAND                            : ANIMDONE_TORSO 
  393.         CHECK_PRIMARY_ATTACK_SEMIAUTO    : +ATTACK_PRIMARY IS_WEAPON_READY_TO_FIRE "mainhand"
  394.  
  395.         // allow pistol whip immediatly after firing
  396.         ATTACK_PISTOL_SECONDARY            : +ATTACK_SECONDARY IS_WEAPON_READY_TO_FIRE "mainhand"
  397.     }
  398. }
  399.  
  400. state ATTACK_ITEM_PRIMARY
  401. {
  402.     movetype legs
  403.  
  404.     entrycommands
  405.     {
  406.         weaponcommand mainhand anim fire
  407.     }
  408.     
  409.     states
  410.     {
  411.         STAND                            : KILLED
  412.  
  413.         STAND                            : !ATTACK_PRIMARY
  414.         CHECK_PRIMARY_ATTACK_SEMIAUTO    : +ATTACK_PRIMARY IS_WEAPON_READY_TO_FIRE "mainhand"
  415.     }
  416. }
  417.  
  418. state ATTACK_BAZOOKA_PRIMARY
  419. {
  420.     movetype legs
  421.     
  422.     entrycommands
  423.     {
  424.         viewmodelanim fire 1
  425.     }
  426.     
  427.     action
  428.     {
  429.         bazooka_stand_run_fire    : POSITION_TYPE "standing" MOVEMENT_TYPE "running"
  430.         bazooka_crouch_run_fire    : POSITION_TYPE "crouching" MOVEMENT_TYPE "running"
  431.         bazooka_crouch_fire        : POSITION_TYPE "crouching"
  432.         bazooka_stand_fire        : default
  433.     }
  434.     
  435.     states
  436.     {
  437.         STAND                            : KILLED
  438.  
  439.         STAND                            : !ATTACK_PRIMARY ANIMDONE_TORSO 
  440.         CHECK_PRIMARY_ATTACK_SEMIAUTO    : +ATTACK_PRIMARY IS_WEAPON_READY_TO_FIRE "mainhand"
  441.     }
  442. }
  443.  
  444. state ATTACK_SHOTGUN_PRIMARY
  445. {
  446.     movetype legs
  447.     
  448.     entrycommands
  449.     {
  450.         viewmodelanim fire 1
  451.     }
  452.     
  453.     action
  454.     {
  455.         shotgun_stand_run_fire    : POSITION_TYPE "standing" MOVEMENT_TYPE "running"
  456.         shotgun_crouch_run_fire    : POSITION_TYPE "crouching" MOVEMENT_TYPE "running"
  457.         shotgun_crouch_fire        : POSITION_TYPE "crouching"
  458.         shotgun_stand_fire        : default
  459.     }
  460.     
  461.     states
  462.     {
  463.         STAND                            : KILLED
  464.  
  465.         STAND                            : !ATTACK_PRIMARY ANIMDONE_TORSO 
  466.         CHECK_PRIMARY_ATTACK_SEMIAUTO    : +ATTACK_PRIMARY IS_WEAPON_READY_TO_FIRE "mainhand"
  467.     }
  468. }
  469.  
  470. //==============================================================================
  471. //==============================================================================
  472. //
  473. // Secondary Attacks (Always Semi-Auto fire)
  474. //
  475. //==============================================================================
  476. state CHECK_SECONDARY_ATTACK
  477. {
  478.     movetype legs
  479.  
  480.     action
  481.     {
  482.         none : default // no torso animation
  483.     }
  484.  
  485.     states
  486.     {
  487.         STAND                    : KILLED
  488.     
  489. //        STAND                    : RELOAD
  490.         STAND                    : !HAS_AMMO_IN_CLIP "mainhand" "secondary"
  491.  
  492.         ATTACK_PISTOL_SECONDARY    : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "pistol" "secondary"
  493.  
  494.         CHECK_SECONDARY_MORTARRIFLE : IS_WEAPON_ACTIVE "mainhand" "Gewehrgranate"        
  495.         ATTACK_RIFLE_SECONDARY    : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "rifle" "secondary" IS_WEAPON_ACTIVE "mainhand" "M1 Garand"
  496.         ATTACK_RIFLE_SECONDARY    : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "rifle" "secondary" IS_WEAPON_ACTIVE "mainhand" "Mauser KAR 98K"
  497.         ATTACK_RIFLE_SECONDARY    : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "rifle" "secondary" IS_WEAPON_ACTIVE "mainhand" "Lee-Enfield"
  498.         ATTACK_RIFLE_SECONDARY    : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "rifle" "secondary" IS_WEAPON_ACTIVE "mainhand" "Mosin Nagant Rifle"
  499.  
  500.         ATTACK_SMG_SECONDARY    : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "smg" "secondary" IS_WEAPON_ACTIVE "mainhand" "Thompson"
  501.         ATTACK_SMG_SECONDARY    : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "smg" "secondary" IS_WEAPON_ACTIVE "mainhand" "MP40"
  502.         ATTACK_SMG_SECONDARY    : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "smg" "secondary" IS_WEAPON_ACTIVE "mainhand" "Sten Mark II"
  503.         ATTACK_SMG_SECONDARY    : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "smg" "secondary" IS_WEAPON_ACTIVE "mainhand" "PPSH SMG"
  504.  
  505.         ATTACK_MG_SECONDARY        : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "mg" "secondary" IS_WEAPON_ACTIVE "mainhand" "BAR"
  506.         ATTACK_MG_SECONDARY        : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "mg" "secondary" IS_WEAPON_ACTIVE "mainhand" "StG 44"
  507.  
  508.         ATTACK_HEAVY_SECONDARY    : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "heavy" "secondary" IS_WEAPON_ACTIVE "mainhand" "Shotgun"
  509.         
  510.         CHARGE_ATTACK_GRENADE_SECONDARY    : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "grenade" "secondary"
  511.  
  512.         PUT_AWAY_ITEM            : IS_WEAPON_ACTIVE "mainhand" "Spy Camera"
  513.         PUT_AWAY_ITEM            : IS_WEAPON_ACTIVE "mainhand" "Binoculars"
  514.         ATTACK_ITEM_SECONDARY    : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "item" "secondary"
  515.  
  516.         STAND                    : default
  517.     }
  518. }
  519.  
  520. // Pistol whip for silent kills
  521. state ATTACK_PISTOL_SECONDARY
  522. {
  523.     movetype legs
  524.  
  525.     entrycommands
  526.     {
  527.         viewmodelanim fire_secondary 1
  528.     }
  529.  
  530.     action
  531.     {
  532.         pistol_butt    : default
  533.     }
  534.     
  535.     states
  536.     {
  537.         STAND         : KILLED
  538.         
  539.         STAND         : ANIMDONE_TORSO
  540.     }
  541. }
  542.  
  543. state CHECK_MORTARRIFLE
  544. {
  545.     movetype legs
  546.  
  547.     action
  548.     {
  549.         none : default // stop torso animation
  550.     }
  551.  
  552.     states
  553.     {
  554.         STAND                    : KILLED
  555.     
  556.         STAND                    : NEW_WEAPON
  557.         STAND                    : RELOAD
  558.         ATTACK_KAR98MORTAR_PRIMARY        : IS_WEAPON_READY_TO_FIRE "mainhand" WEAPON_CURRENT_FIRE_ANIM "mainhand" "0"
  559.         ATTACK_KAR98MORTAR_SECONDARY        : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "heavy" "secondary" WEAPON_CURRENT_FIRE_ANIM "mainhand" "1"
  560.         STAND                    : !ATTACK_PRIMARY
  561.     }
  562. }
  563.  
  564. state CHECK_SECONDARY_MORTARRIFLE
  565. {
  566.     movetype legs
  567.  
  568.     action
  569.     {
  570.         none : default // stop torso animation
  571.     }
  572.  
  573.     states
  574.     {
  575.         STAND                    : KILLED
  576.     
  577.         STAND                    : NEW_WEAPON
  578.         STAND                    : RELOAD
  579.         ATTACK_KAR98MORTAR_PREPARE        : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "heavy" "secondary" WEAPON_CURRENT_FIRE_ANIM "mainhand" "0"
  580.         ATTACK_KAR98MORTAR_SECONDARY        : IS_WEAPONCLASS_READY_TO_FIRE "mainhand" "heavy" "secondary" WEAPON_CURRENT_FIRE_ANIM "mainhand" "1"
  581.         STAND                    : !ATTACK_PRIMARY
  582.     }
  583. }
  584.  
  585.  
  586. state ATTACK_KAR98MORTAR_PRIMARY
  587. {
  588.     movetype legs
  589.  
  590.     entrycommands
  591.     {
  592.         viewmodelanim fire 1
  593.     }
  594.  
  595.     action
  596.     {
  597.         // Fire from the hip when jogging,
  598.         // from the shoulder when walking or standing
  599.         rifle_stand_run_fire    : POSITION_TYPE "standing" MOVEMENT_TYPE "running"
  600.         rifle_crouch_run_fire    : POSITION_TYPE "crouching" MOVEMENT_TYPE "running"
  601.         rifle_stand_walk_fire    : POSITION_TYPE "standing" MOVEMENT_TYPE "walking"
  602.         rifle_crouch_fire        : POSITION_TYPE "crouching"
  603.         rifle_stand_fire        : default
  604.     }
  605.  
  606.     states
  607.     {
  608.         STAND                    : KILLED
  609.         ATTACK_RIFLE_RECHAMBER            : ANIMDONE_TORSO
  610.     }
  611. }
  612.  
  613. state ATTACK_KAR98MORTAR_SECONDARY
  614. {
  615.     movetype legs
  616.  
  617.     entrycommands
  618.     {
  619.         viewmodelanim fire 1
  620.         weaponcommand mainhand surface kar98Gren_proj +nodraw
  621.     }
  622.  
  623.     exitcommands
  624.     {
  625.         weaponcommand mainhand setcurrentfireanim 0
  626.     }
  627.  
  628.     action
  629.     {
  630.         // Fire from the hip when jogging,
  631.         // from the shoulder when walking or standing
  632.         mortarrifle_stand_run_fire    : POSITION_TYPE "standing" MOVEMENT_TYPE "running"
  633.         mortarrifle_crouch_run_fire    : POSITION_TYPE "crouching" MOVEMENT_TYPE "running"
  634.         mortarrifle_stand_walk_fire    : POSITION_TYPE "standing" MOVEMENT_TYPE "walking"
  635.         mortarrifle_crouch_fire    : POSITION_TYPE "crouching"
  636.         mortarrifle_stand_fire    : default
  637.     }
  638.     
  639.     states
  640.     {
  641.         STAND         : KILLED
  642.         ATTACK_RIFLE_RECHAMBER    : ANIMDONE_TORSO
  643.     }
  644. }
  645.  
  646. state ATTACK_KAR98MORTAR_PREPARE
  647. {
  648.     movetype legs
  649.  
  650.     entrycommands
  651.     {
  652.         viewmodelanim fire_secondary 1
  653.         weaponcommand mainhand setcurrentfireanim 1
  654.         weaponcommand mainhand anim attachgrenade
  655.     }
  656.     exitcommands
  657.     {
  658.         weaponcommand mainhand surface kar98Gren_proj -nodraw
  659.     }
  660.  
  661.     action
  662.     {
  663.         mortarrifle_attachmortar : default
  664.     }
  665.     
  666.     states
  667.     {
  668.         STAND         : KILLED
  669.         STAND        : ANIMDONE_TORSO
  670.     }
  671. }
  672.  
  673.  
  674.  
  675. state ATTACK_RIFLE_SECONDARY
  676. {
  677.     movetype legs
  678.  
  679.     entrycommands
  680.     {
  681.         viewmodelanim fire_secondary 1
  682.     }
  683.  
  684.     action
  685.     {
  686.         rifle_butt    : default
  687.     }
  688.     
  689.     states
  690.     {
  691.         STAND         : KILLED
  692.         STAND         : ANIMDONE_TORSO
  693.     }
  694. }
  695.  
  696. state ATTACK_SMG_SECONDARY
  697. {
  698.     movetype legs
  699.  
  700.     entrycommands
  701.     {
  702.         viewmodelanim fire_secondary 1
  703.     }
  704.  
  705.     action
  706.     {
  707.         mp40_butt    : IS_WEAPON_ACTIVE "mainhand" "MP40"
  708.         sten_butt    : IS_WEAPON_ACTIVE "mainhand" "Sten Mark II"
  709.         smg_butt    : default
  710.     }
  711.     
  712.     states
  713.     {
  714.         STAND         : KILLED
  715.         
  716.         STAND         : ANIMDONE_TORSO
  717.     }
  718. }
  719.  
  720. state ATTACK_MG_SECONDARY
  721. {
  722.     movetype legs
  723.  
  724.     entrycommands
  725.     {
  726.         viewmodelanim fire_secondary 1
  727.     }
  728.  
  729.     action
  730.     {
  731.         mp44_butt    : IS_WEAPON_ACTIVE "mainhand" "StG 44"
  732.         mg_butt        : default
  733.     }
  734.     
  735.     states
  736.     {
  737.         STAND         : KILLED
  738.         
  739.         STAND         : ANIMDONE_TORSO
  740.     }
  741. }
  742.  
  743. state ATTACK_HEAVY_SECONDARY
  744. {
  745.     movetype legs
  746.  
  747.     entrycommands
  748.     {
  749.         viewmodelanim fire_secondary 1
  750.     }
  751.  
  752.     action
  753.     {
  754.         shotgun_butt    : default
  755.     }
  756.     
  757.     states
  758.     {
  759.         STAND             : KILLED
  760.         
  761.         STAND             : ANIMDONE_TORSO
  762.     }
  763. }
  764.  
  765. // put away the item and pull out the last active weapon
  766. state PUT_AWAY_ITEM
  767. {
  768.     entrycommands
  769.     {
  770. //        deactivateweapon righthand
  771.         commanddelay 0.05 uselast
  772.     }
  773.  
  774.     states
  775.     {
  776.         STAND        : default
  777.     }
  778.     
  779. //    exitcommands
  780. //    {
  781. //        uselast
  782. //    }
  783. }
  784.  
  785. state ATTACK_ITEM_SECONDARY
  786. {
  787.     movetype legs
  788.  
  789.     entrycommands
  790.     {
  791.         weaponcommand mainhand anim secondaryfire
  792.     }
  793.     
  794.     states
  795.     {
  796.         STAND                            : KILLED
  797.  
  798.         STAND                            : !ATTACK_PRIMARY
  799.         CHECK_PRIMARY_ATTACK_SEMIAUTO    : +ATTACK_PRIMARY IS_WEAPON_READY_TO_FIRE "mainhand"
  800.     }
  801. }
  802.  
  803. //==============================================================================
  804. //==============================================================================
  805. //
  806. // Primary Charge Up Attacks (grenades)
  807. //
  808. //==============================================================================
  809.  
  810. state CHARGE_ATTACK_GRENADE
  811. {
  812.     movetype legs
  813.  
  814.     entrycommands
  815.     {
  816.         viewmodelanim charge
  817.     }
  818.     
  819.     action
  820.     {
  821.         steilhandgranate_crouch_charge    : IS_WEAPON_ACTIVE "mainhand" "Stielhandgranate" POSITION_TYPE "crouching"
  822.         steilhandgranate_stand_charge    : IS_WEAPON_ACTIVE "mainhand" "Stielhandgranate"
  823.  
  824. //        nebelhandgranate_crouch_charge    : IS_WEAPON_ACTIVE "mainhand" "Nebelhandgranate" POSITION_TYPE "crouching"
  825.         nebelhandgranate_stand_charge    : IS_WEAPON_ACTIVE "mainhand" "Nebelhandgranate"
  826.  
  827. //        nebelhandgranate_crouch_charge    : IS_WEAPON_ACTIVE "mainhand" "RDG-1 Smoke Grenade" POSITION_TYPE "crouching"
  828. //        nebelhandgranate_stand_charge    : IS_WEAPON_ACTIVE "mainhand" "RDG-1 Smoke Grenade"
  829.  
  830. //        nebelhandgranate_crouch_charge    : IS_WEAPON_ACTIVE "mainhand" "M18 Smoke Grenade" POSITION_TYPE "crouching"
  831. //        nebelhandgranate_stand_charge    : IS_WEAPON_ACTIVE "mainhand" "M18 Smoke Grenade"
  832.     
  833.         grenade_crouch_charge            : POSITION_TYPE "crouching"
  834.         grenade_stand_charge            : default
  835.     }
  836.  
  837.     states
  838.     {
  839.                                         // drop a grenade when he gets hit
  840. //        RELEASE_ATTACK_GRENADE    : KILLED
  841.         RELEASE_KILLED_FRAG        : KILLED
  842.         RELEASE_ATTACK_GRENADE    : !ATTACK_PRIMARY MIN_CHARGE_TIME_MET "mainhand"
  843.     }
  844. }
  845.  
  846. state RELEASE_ATTACK_GRENADE
  847. {
  848.     movetype legs
  849.  
  850.     entrycommands
  851.     {
  852.         viewmodelanim fire
  853.     }
  854.  
  855.     action
  856.     {
  857.         steilhandgranate_crouch_fire    : IS_WEAPON_ACTIVE "mainhand" "Stielhandgranate" POSITION_TYPE "crouching"
  858.         steilhandgranate_stand_fire        : IS_WEAPON_ACTIVE "mainhand" "Stielhandgranate"
  859.  
  860.         steilhandgranate_crouch_fire    : IS_WEAPON_ACTIVE "mainhand" "Nebelhandgranate" POSITION_TYPE "crouching"
  861.         steilhandgranate_stand_fire    : IS_WEAPON_ACTIVE "mainhand" "Nebelhandgranate"
  862.     
  863.         steilhandgranate_crouch_fire    : IS_WEAPON_ACTIVE "mainhand" "RDG-1 Smoke Grenade" POSITION_TYPE "crouching"
  864.         steilhandgranate_stand_fire    : IS_WEAPON_ACTIVE "mainhand" "RDG-1 Smoke Grenade"
  865.  
  866.         steilhandgranate_crouch_fire    : IS_WEAPON_ACTIVE "mainhand" "M18 Smoke Grenade" POSITION_TYPE "crouching"
  867.         steilhandgranate_stand_fire    : IS_WEAPON_ACTIVE "mainhand" "M18 Smoke Grenade"
  868.  
  869.         grenade_crouch_fire                : POSITION_TYPE "crouching"
  870.         grenade_stand_fire                : default
  871.     }
  872.  
  873.     states
  874.     {
  875.         RELEASE_KILLED_FRAG : KILLED MIN_CHARGE_TIME_MET "mainhand" // killed before the grenade was released
  876.         STAND                 : KILLED
  877.  
  878.         STAND                 : ANIMDONE_TORSO
  879.     }
  880. }
  881.  
  882. state CHARGE_ATTACK_GRENADE_SECONDARY
  883. {
  884.     movetype legs
  885.  
  886.     entrycommands
  887.     {
  888.         viewmodelanim charge
  889.     }
  890.     
  891.     action
  892.     {
  893.         steilhandgranate_crouch_charge_secondary    : IS_WEAPON_ACTIVE "mainhand" "Stielhandgranate" POSITION_TYPE "crouching"
  894.         steilhandgranate_stand_charge_secondary        : IS_WEAPON_ACTIVE "mainhand" "Stielhandgranate"
  895.  
  896. //        nebelhandgranate_crouch_charge_secondary    : IS_WEAPON_ACTIVE "mainhand" "Nebelhandgranate" POSITION_TYPE "crouching"
  897.         nebelhandgranate_stand_charge_secondary        : IS_WEAPON_ACTIVE "mainhand" "Nebelhandgranate"
  898.  
  899. //        nebelhandgranate_crouch_charge_secondary    : IS_WEAPON_ACTIVE "mainhand" "RDG-1 Smoke Grenade" POSITION_TYPE "crouching"
  900. //        nebelhandgranate_stand_charge_secondary        : IS_WEAPON_ACTIVE "mainhand" "RDG-1 Smoke Grenade"
  901.  
  902. //        nebelhandgranate_crouch_charge_secondary    : IS_WEAPON_ACTIVE "mainhand" "M18 Smoke Grenade" POSITION_TYPE "crouching"
  903. //        nebelhandgranate_stand_charge_secondary        : IS_WEAPON_ACTIVE "mainhand" "M18 Smoke Grenade"
  904.     
  905.         grenade_crouch_charge_secondary                : POSITION_TYPE "crouching"
  906.         grenade_stand_charge_secondary                : default
  907.     }
  908.  
  909.     states
  910.     {
  911. //        RELEASE_ATTACK_GRENADE_SECONDARY        : PAIN    // This would make the player 
  912.                                     // drop a grenade when he gets hit
  913. //        RELEASE_ATTACK_GRENADE_SECONDARY        : KILLED
  914.         RELEASE_KILLED_FRAG                        : KILLED
  915.         RELEASE_ATTACK_GRENADE_SECONDARY        : !ATTACK_SECONDARY MIN_CHARGE_TIME_MET "mainhand"
  916.     }
  917. }
  918.  
  919. state RELEASE_ATTACK_GRENADE_SECONDARY
  920. {
  921.     movetype legs
  922.  
  923.     entrycommands
  924.     {
  925.         viewmodelanim fire
  926.     }
  927.  
  928.     action
  929.     {
  930.         steilhandgranate_crouch_fire_secondary    : IS_WEAPON_ACTIVE "mainhand" "Stielhandgranate" POSITION_TYPE "crouching"
  931.         steilhandgranate_stand_fire_secondary    : IS_WEAPON_ACTIVE "mainhand" "Stielhandgranate"
  932.  
  933.         steilhandgranate_crouch_fire_secondary    : IS_WEAPON_ACTIVE "mainhand" "Nebelhandgranate" POSITION_TYPE "crouching"
  934.         steilhandgranate_stand_fire_secondary    : IS_WEAPON_ACTIVE "mainhand" "Nebelhandgranate"
  935.     
  936.         steilhandgranate_crouch_fire_secondary    : IS_WEAPON_ACTIVE "mainhand" "RDG-1 Smoke Grenade" POSITION_TYPE "crouching"
  937.         steilhandgranate_stand_fire_secondary    : IS_WEAPON_ACTIVE "mainhand" "RDG-1 Smoke Grenade"
  938.  
  939.         steilhandgranate_crouch_fire_secondary    : IS_WEAPON_ACTIVE "mainhand" "M18 Smoke Grenade" POSITION_TYPE "crouching"
  940.         steilhandgranate_stand_fire_secondary    : IS_WEAPON_ACTIVE "mainhand" "M18 Smoke Grenade"
  941.  
  942.         grenade_crouch_fire_secondary            : POSITION_TYPE "crouching"
  943.         grenade_stand_fire_secondary            : default
  944.     }
  945.  
  946.     states
  947.     {
  948.         RELEASE_KILLED_FRAG : KILLED MIN_CHARGE_TIME_MET "mainhand" // killed before the grenade was released
  949.         STAND                 : KILLED
  950.  
  951.         STAND                 : ANIMDONE_TORSO
  952.     }
  953. }
  954.  
  955. // killed while charging a frag grenade
  956. state RELEASE_KILLED_FRAG
  957. {
  958.     entrycommands
  959.     {
  960.         charge mainhand secondary // prep to drop the grenade
  961.         releasefire mainhand secondary // drop the grenade
  962.     }
  963.     
  964.     states
  965.     {
  966.         STAND    : default
  967.     }
  968. }
  969.  
  970.  
  971. //==============================================================================
  972. //==============================================================================
  973. //
  974. // PUTAWAY
  975. //
  976. //==============================================================================
  977.  
  978. state PUTAWAY_MAIN
  979. {
  980. //    movetype legs
  981.  
  982.     entrycommands
  983.     {
  984.         zoomoff
  985.         viewmodelanim putaway
  986.     }
  987.  
  988.     states
  989.     {
  990.         // don't go through the putaway anim if 
  991.         // we're switching to another weapon
  992.         // only do if g_immediateswitch is set
  993.         PUTAWAY_SKIPANIM    : IMMEDIATE_SWITCH NEW_WEAPON
  994.     
  995.         PUTAWAY_PISTOL        : IS_WEAPONCLASS_ACTIVE "mainhand" "pistol"
  996.         PUTAWAY_RIFLE        : IS_WEAPONCLASS_ACTIVE "mainhand" "rifle"
  997.         PUTAWAY_RIFLE        : IS_WEAPON_ACTIVE "mainhand" "Gewehrgranate"        
  998.         PUTAWAY_GRENADE        : IS_WEAPONCLASS_ACTIVE "mainhand" "grenade"
  999.         PUTAWAY_SMG            : IS_WEAPONCLASS_ACTIVE "mainhand" "smg"
  1000.         PUTAWAY_MG            : IS_WEAPONCLASS_ACTIVE "mainhand" "mg"
  1001. //        PUTAWAY_PISTOL        : IS_WEAPONCLASS_ACTIVE "mainhand" "item" // hold all items like a pistol for now
  1002.         PUTAWAY_HEAVY        : IS_WEAPONCLASS_ACTIVE "mainhand" "heavy"
  1003.  
  1004.         // Catchall at the end        
  1005. //        PUTAWAY_RIFLE        : default
  1006.         PUTAWAY_NOANIM        : default
  1007.     }
  1008. }
  1009.  
  1010. // called when we want to skip the putaway anim
  1011. state PUTAWAY_SKIPANIM
  1012. {
  1013.     entrycommands
  1014.     {
  1015.         deactivateweapon righthand
  1016.     }
  1017.     
  1018.     states
  1019.     {
  1020.         RAISE_WEAPON    : default
  1021.     }
  1022. }
  1023.  
  1024. state PUTAWAY_NOANIM
  1025. {
  1026.     entrycommands
  1027.     {
  1028.         deactivateweapon righthand
  1029.     }
  1030.  
  1031.     states
  1032.     {
  1033.         RAISE_WEAPON    : NEW_WEAPON
  1034.         STAND            : default
  1035.     }
  1036. }
  1037.  
  1038. state PUTAWAY_PISTOL
  1039. {
  1040. //    movetype legs
  1041.     
  1042.     action
  1043.     {
  1044.         pistol_crouch_lower    : POSITION_TYPE "crouching"
  1045.         pistol_stand_lower    : default
  1046.     }
  1047.     legs
  1048.     {
  1049.         pistol_stand_idle    : ON_LADDER
  1050.     }
  1051.     
  1052.     states
  1053.     {
  1054.         STAND                 : KILLED
  1055.         
  1056.         GET_ON_LADDER        : ANIMDONE_TORSO ON_LADDER
  1057.         STAND                 : ANIMDONE_TORSO
  1058.     }
  1059. }
  1060.  
  1061. state PUTAWAY_RIFLE
  1062. {
  1063. //    movetype legs
  1064.     
  1065.     action
  1066.     {
  1067.         rifle_crouch_lower    : POSITION_TYPE "crouching"
  1068.         rifle_stand_lower    : default
  1069.     }
  1070.     legs
  1071.     {
  1072.         rifle_stand_idle    : ON_LADDER
  1073.     }
  1074.     
  1075.     states
  1076.     {
  1077.         STAND                 : KILLED
  1078.         
  1079.         GET_ON_LADDER        : ANIMDONE_TORSO ON_LADDER
  1080.         STAND                 : ANIMDONE_TORSO
  1081.     }
  1082. }
  1083.  
  1084. state PUTAWAY_SMG
  1085. {
  1086. //    movetype legs
  1087.     
  1088.     action
  1089.     {
  1090.         mp40_crouch_lower    : IS_WEAPON_ACTIVE "mainhand" "MP40" POSITION_TYPE "crouching"
  1091.         mp40_stand_lower    : IS_WEAPON_ACTIVE "mainhand" "MP40"
  1092.  
  1093.         sten_crouch_lower    : IS_WEAPON_ACTIVE "mainhand" "Sten Mark II" POSITION_TYPE "crouching"
  1094.         sten_stand_lower    : IS_WEAPON_ACTIVE "mainhand" "Sten Mark II"
  1095.  
  1096.         smg_crouch_lower    : POSITION_TYPE "crouching"
  1097.         smg_stand_lower        : default
  1098.     }
  1099.     legs
  1100.     {
  1101.         mp40_stand_idle        : IS_WEAPON_ACTIVE "mainhand" "MP40" ON_LADDER
  1102.         sten_stand_idle        : IS_WEAPON_ACTIVE "mainhand" "Sten Mark II" ON_LADDER
  1103.         smg_stand_idle        : ON_LADDER
  1104.     }
  1105.     
  1106.     states
  1107.     {
  1108.         STAND                 : KILLED
  1109.         
  1110.         GET_ON_LADDER        : ANIMDONE_TORSO ON_LADDER
  1111.         STAND                 : ANIMDONE_TORSO
  1112.     }
  1113. }
  1114.  
  1115. state PUTAWAY_MG
  1116. {
  1117. //    movetype legs
  1118.     
  1119.     action
  1120.     {
  1121.         mp44_crouch_lower    : IS_WEAPON_ACTIVE "mainhand" "StG 44" POSITION_TYPE "crouching"
  1122.         mp44_stand_lower    : IS_WEAPON_ACTIVE "mainhand" "StG 44"
  1123.  
  1124.         mg_crouch_lower        : POSITION_TYPE "crouching"
  1125.         mg_stand_lower        : default
  1126.     }
  1127.     legs
  1128.     {
  1129.         mp44_stand_idle        : IS_WEAPON_ACTIVE "mainhand" "StG 44" ON_LADDER
  1130.     
  1131.         mg_stand_idle        : ON_LADDER
  1132.     }
  1133.     
  1134.     states
  1135.     {
  1136.         STAND                 : KILLED
  1137.         
  1138.         GET_ON_LADDER        : ANIMDONE_TORSO ON_LADDER
  1139.         STAND                 : ANIMDONE_TORSO
  1140.     }
  1141. }
  1142.  
  1143. state PUTAWAY_GRENADE
  1144. {
  1145. //    movetype legs
  1146.     
  1147.     action
  1148.     {
  1149.         steilhandgranate_crouch_lower    : IS_WEAPON_ACTIVE "mainhand" "Stielhandgranate" POSITION_TYPE "crouching"
  1150.         steilhandgranate_stand_lower    : IS_WEAPON_ACTIVE "mainhand" "Stielhandgranate"
  1151.  
  1152.         steilhandgranate_crouch_lower    : IS_WEAPON_ACTIVE "mainhand" "Nebelhandgranate" POSITION_TYPE "crouching"
  1153.         steilhandgranate_stand_lower    : IS_WEAPON_ACTIVE "mainhand" "Nebelhandgranate"
  1154.     
  1155.         grenade_crouch_lower            : POSITION_TYPE "crouching"
  1156.         grenade_stand_lower                : default
  1157.     }
  1158.     legs
  1159.     {
  1160.         steilhandgranate_stand_idle        : IS_WEAPON_ACTIVE "mainhand" "Stielhandgranate"
  1161.         steilhandgranate_stand_idle        : IS_WEAPON_ACTIVE "mainhand" "Nebelhandgranate"
  1162.         grenade_stand_idle                : IS_WEAPONCLASS_ACTIVE "mainhand" "grenade"
  1163.         grenade_stand_idle                : ON_LADDER
  1164.     }
  1165.     
  1166.     states
  1167.     {
  1168.         STAND                     : KILLED
  1169.         
  1170.         GET_ON_LADDER            : ANIMDONE_TORSO ON_LADDER
  1171.         STAND                     : ANIMDONE_TORSO
  1172.     }
  1173. }
  1174.  
  1175. state PUTAWAY_HEAVY
  1176. {
  1177. //    movetype legs
  1178.     
  1179.     action
  1180.     {
  1181. //        shotgun_crouch_lower    : POSITION_TYPE "crouching" IS_WEAPON_ACTIVE "mainhand" "Shotgun"
  1182. //        shotgun_stand_lower        : IS_NEW_WEAPON "mainhand" "Shotgun"
  1183.         shotgun_crouch_lower    : POSITION_TYPE "crouching" IS_WEAPON_ACTIVE "mainhand" "Shotgun"
  1184.         shotgun_stand_lower        : IS_WEAPON_ACTIVE "mainhand" "Shotgun"
  1185.         
  1186.         bazooka_crouch_lower    : POSITION_TYPE "crouching"
  1187.         bazooka_stand_lower        : default
  1188.     }
  1189.     legs
  1190.     {
  1191.         shotgun_stand_idle        : ON_LADDER IS_WEAPON_ACTIVE "mainhand" "Shotgun"
  1192.         
  1193.         bazooka_stand_idle        : ON_LADDER
  1194.     }
  1195.     
  1196.     states
  1197.     {
  1198.         STAND                     : KILLED
  1199.         
  1200.         GET_ON_LADDER            : ANIMDONE_TORSO ON_LADDER
  1201.         STAND                     : ANIMDONE_TORSO
  1202.     }
  1203. }
  1204.  
  1205. //==============================================================================
  1206. //==============================================================================
  1207. //
  1208. // RAISE_WEAPON
  1209. //
  1210. //==============================================================================
  1211.  
  1212. state RAISE_WEAPON
  1213. {
  1214.     movetype legs
  1215.  
  1216.     entrycommands
  1217.     {
  1218.         viewmodelanim pullout
  1219.  
  1220.         // just to make sure nothing funky's 
  1221.         // attached that shouldn't be.
  1222.         correctweaponattachments
  1223.     }
  1224.  
  1225.     states
  1226.     {
  1227.         RAISE_PISTOL        : IS_NEW_WEAPONCLASS "mainhand" "pistol"
  1228.         RAISE_RIFLE        : IS_NEW_WEAPONCLASS "mainhand" "rifle"
  1229.         RAISE_RIFLE        : IS_NEW_WEAPON "mainhand" "Gewehrgranate"        
  1230.         RAISE_GRENADE        : IS_NEW_WEAPONCLASS "mainhand" "grenade"
  1231.         RAISE_SMG            : IS_NEW_WEAPONCLASS "mainhand" "smg"
  1232.         RAISE_MG            : IS_NEW_WEAPONCLASS "mainhand" "mg"
  1233. //        RAISE_PISTOL        : IS_NEW_WEAPONCLASS "mainhand" "item" // hold all items like a pistol for now
  1234.         RAISE_HEAVY            : IS_NEW_WEAPONCLASS "mainhand" "heavy"
  1235.         RAISE_PAPERS        : IS_NEW_WEAPON "mainhand" "Papers"
  1236.         
  1237. //        RAISE_RIFLE            : default
  1238.         RAISE_NOANIM        : default
  1239.     }
  1240. }
  1241.  
  1242. state RAISE_NOANIM
  1243. {
  1244.     entrycommands
  1245.     {
  1246.         // delay the activation for a frame so that the player
  1247.         // spends at least one frame without a weapon, thus 
  1248.         // letting the legs state know that we've switched
  1249.         commanddelay 0.05 activatenewweapon
  1250.         commanddelay 0.05 forcetorsostate "STAND"
  1251.     }
  1252.  
  1253. //    states
  1254. //    {
  1255. //        STAND        : default
  1256. //    }
  1257. }
  1258.  
  1259. state RAISE_RIFLE
  1260. {
  1261.     movetype legs
  1262.     
  1263.     action
  1264.     {
  1265.         rifle_crouch_raise    : POSITION_TYPE "crouching"
  1266.         rifle_stand_raise    : default
  1267.     }
  1268.     
  1269.     states
  1270.     {
  1271.         STAND                 : KILLED
  1272.         
  1273.         STAND                 : ANIMDONE_TORSO
  1274.         
  1275.         // allow immediate switching to a different weapon instead
  1276.         RAISE_ABORT            : +NEW_WEAPON
  1277.     }
  1278. }
  1279.  
  1280. state RAISE_SMG
  1281. {
  1282.     movetype legs
  1283.     
  1284.     action
  1285.     {
  1286.         mp40_crouch_raise    : IS_NEW_WEAPON "mainhand" "MP40" POSITION_TYPE "crouching"
  1287.         mp40_stand_raise    : IS_NEW_WEAPON "mainhand" "MP40"
  1288.  
  1289.         sten_crouch_raise    : IS_NEW_WEAPON "mainhand" "Sten Mark II" POSITION_TYPE "crouching"
  1290.         sten_stand_raise    : IS_NEW_WEAPON "mainhand" "Sten Mark II"
  1291.  
  1292.         smg_crouch_raise    : POSITION_TYPE "crouching"
  1293.         smg_stand_raise        : default
  1294.     }
  1295.     
  1296.     states
  1297.     {
  1298.         STAND                 : KILLED
  1299.         
  1300.         STAND                 : ANIMDONE_TORSO
  1301.         
  1302.         // allow immediate switching to a different weapon instead
  1303.         RAISE_ABORT            : +NEW_WEAPON
  1304.     }
  1305. }
  1306.  
  1307. state RAISE_MG
  1308. {
  1309.     movetype legs
  1310.     
  1311.     action
  1312.     {
  1313.         mp44_crouch_raise    : IS_NEW_WEAPON "mainhand" "StG 44" POSITION_TYPE "crouching"
  1314.         mp44_stand_raise    : IS_NEW_WEAPON "mainhand" "StG 44"
  1315.  
  1316.         mg_crouch_raise    : POSITION_TYPE "crouching"
  1317.         mg_stand_raise    : default
  1318.     }
  1319.     
  1320.     states
  1321.     {
  1322.         STAND                 : KILLED
  1323.         
  1324.         STAND                 : ANIMDONE_TORSO
  1325.         
  1326.         // allow immediate switching to a different weapon instead
  1327.         RAISE_ABORT            : +NEW_WEAPON
  1328.     }
  1329. }
  1330.  
  1331. state RAISE_PISTOL
  1332. {
  1333.     movetype legs
  1334.     
  1335.     action
  1336.     {
  1337.         pistol_crouch_raise    : POSITION_TYPE "crouching"
  1338.         pistol_stand_raise    : default
  1339.     }
  1340.     
  1341.     states
  1342.     {
  1343.         STAND                 : KILLED
  1344.         
  1345.         STAND                 : ANIMDONE_TORSO
  1346.         
  1347.         // allow immediate switching to a different weapon instead
  1348.         RAISE_ABORT            : +NEW_WEAPON
  1349.     }
  1350. }
  1351.  
  1352. state RAISE_GRENADE
  1353. {
  1354.     movetype legs
  1355.     
  1356.     action
  1357.     {
  1358.         steilhandgranate_crouch_raise    : IS_NEW_WEAPON "mainhand" "Stielhandgranate" POSITION_TYPE "crouching"
  1359.         steilhandgranate_stand_raise    : IS_NEW_WEAPON "mainhand" "Stielhandgranate"
  1360.  
  1361.         steilhandgranate_crouch_raise    : IS_NEW_WEAPON "mainhand" "Nebelhandgranate" POSITION_TYPE "crouching"
  1362.         steilhandgranate_stand_raise    : IS_NEW_WEAPON "mainhand" "Nebelhandgranate"
  1363.     
  1364.         grenade_crouch_raise    : POSITION_TYPE "crouching"
  1365.         grenade_stand_raise        : default
  1366.     }
  1367.     
  1368.     states
  1369.     {
  1370.         STAND                 : KILLED
  1371.         
  1372.         STAND                 : ANIMDONE_TORSO
  1373.         
  1374.         // allow immediate switching to a different weapon instead
  1375.         RAISE_ABORT            : +NEW_WEAPON
  1376.     }
  1377. }
  1378.  
  1379. state RAISE_HEAVY
  1380. {
  1381.     movetype legs
  1382.     
  1383.     action
  1384.     {
  1385.         shotgun_crouch_raise    : POSITION_TYPE "crouching" IS_NEW_WEAPON "mainhand" "Shotgun"
  1386.         shotgun_stand_raise        : IS_NEW_WEAPON "mainhand" "Shotgun"
  1387.         
  1388.         bazooka_crouch_raise    : POSITION_TYPE "crouching"
  1389.         bazooka_stand_raise        : default
  1390.     }
  1391.     
  1392.     states
  1393.     {
  1394.         STAND                 : KILLED
  1395.         
  1396.         STAND                 : ANIMDONE_TORSO
  1397.         
  1398.         // allow immediate switching to a different weapon instead
  1399.         RAISE_ABORT            : +NEW_WEAPON
  1400.     }
  1401. }
  1402.  
  1403. state RAISE_PAPERS
  1404. {
  1405.     movetype legs
  1406.     
  1407.     action
  1408.     {
  1409.         show_papers    : default
  1410.     }
  1411.     
  1412.     states
  1413.     {
  1414.         STAND        : KILLED
  1415.         
  1416.         STAND        : ANIMDONE_TORSO
  1417.         
  1418.         // allow immediate switching to a different weapon instead
  1419.         RAISE_ABORT            : +NEW_WEAPON
  1420.     }
  1421. }
  1422.  
  1423. // This state allows the player to abort the raising 
  1424. // of a weapon in favor of a different new weapon.
  1425. state RAISE_ABORT
  1426. {
  1427.     entrycommands
  1428.     {
  1429.         deactivateweapon righthand
  1430.     }
  1431.     
  1432.     states
  1433.     {
  1434.         RAISE_WEAPON    : default
  1435.     }
  1436. }
  1437.  
  1438. //==============================================================================
  1439. //==============================================================================
  1440. //
  1441. // Weapon Reloading
  1442. //
  1443. //==============================================================================
  1444.  
  1445. state RELOAD_WEAPON
  1446. {
  1447.     states
  1448.     {
  1449.         RELOAD_SPRINGFIELD    : IS_WEAPON_ACTIVE "mainhand" "Springfield '03 Sniper"
  1450.         RELOAD_SPRINGFIELD    : IS_WEAPON_ACTIVE "mainhand" "KAR98 - Sniper"
  1451.         RELOAD_SHOTGUN        : IS_WEAPON_ACTIVE "mainhand" "Shotgun"
  1452.         RELOAD_NAGANTREV    : IS_WEAPON_ACTIVE "mainhand" "Nagant Revolver"
  1453.         RELOAD_WEBLEY        : IS_WEAPON_ACTIVE "mainhand" "Webley Revolver"
  1454.  
  1455.         RELOAD_PISTOL        : IS_WEAPONCLASS_ACTIVE "mainhand" "pistol"
  1456.         RELOAD_RIFLE        : IS_WEAPONCLASS_ACTIVE "mainhand" "rifle"
  1457.         RELOAD_RIFLE        : IS_WEAPON_ACTIVE "mainhand" "Gewehrgranate"        
  1458.         RELOAD_SMG            : IS_WEAPONCLASS_ACTIVE "mainhand" "smg"
  1459.         RELOAD_MG            : IS_WEAPONCLASS_ACTIVE "mainhand" "mg"
  1460.         RELOAD_GRENADE        : IS_WEAPONCLASS_ACTIVE "mainhand" "grenade"
  1461. //        RELOAD_PISTOL        : IS_WEAPONCLASS_ACTIVE "mainhand" "item" // hold all items like a pistol for now
  1462.         RELOAD_HEAVY        : IS_WEAPONCLASS_ACTIVE "mainhand" "heavy"
  1463.  
  1464.         RELOAD_RIFLE        : default    
  1465.     }
  1466. }
  1467.  
  1468. state RELOAD_RIFLE
  1469. {
  1470.     movetype legs
  1471.  
  1472.     entrycommands
  1473.     {
  1474.         zoomoff
  1475.         viewmodelanim reload
  1476.     }
  1477.  
  1478.     action
  1479.     {
  1480.         kar98_reload        : IS_WEAPON_ACTIVE "mainhand" "Gewehrgranate"
  1481.         kar98_reload        : IS_WEAPON_ACTIVE "mainhand" "Mauser KAR 98K"
  1482.         enfield_reload        : IS_WEAPON_ACTIVE "mainhand" "Lee-Enfield"
  1483.         svt_reload        : IS_WEAPON_ACTIVE "mainhand" "SVT 40"
  1484.         mosin_reload        : IS_WEAPON_ACTIVE "mainhand" "Mosin Nagant Rifle"
  1485.         g43_reload        : IS_WEAPON_ACTIVE "mainhand" "G 43"
  1486.         rifle_reload        : default
  1487.     }
  1488.  
  1489.     states
  1490.     {
  1491.         STAND                 : KILLED
  1492.         STAND                : ANIMDONE_TORSO
  1493.         RELOAD_INTERUPTED    : NEW_WEAPON
  1494.         
  1495.         RELOAD_INTERUPTED    : IS_USING_VEHICLE
  1496.         RELOAD_INTERUPTED    : IS_USING_TURRET
  1497.  
  1498.         // Note that this is ok since sniper rifles don't come through here
  1499.         //RELOAD_INTERUPTED_SECONDARYATTACK    : +ATTACK_SECONDARY
  1500.     }
  1501. }
  1502.  
  1503. state RELOAD_SMG
  1504. {
  1505.     movetype legs
  1506.  
  1507.     entrycommands
  1508.     {
  1509.         viewmodelanim reload
  1510.     }
  1511.  
  1512.     action
  1513.     {
  1514.         mp40_reload            : IS_WEAPON_ACTIVE "mainhand" "MP40"
  1515.         sten_reload            : IS_WEAPON_ACTIVE "mainhand" "Sten Mark II"
  1516.         ppsh_reload            : IS_WEAPON_ACTIVE "mainhand" "PPSH SMG"
  1517.         smg_reload            : default
  1518.     }
  1519.  
  1520.     states
  1521.     {
  1522.         STAND                 : KILLED
  1523.         STAND                : ANIMDONE_TORSO
  1524.         RELOAD_INTERUPTED_CORRECT_ATTACHMENTS    : NEW_WEAPON
  1525.         
  1526.         RELOAD_INTERUPTED_CORRECT_ATTACHMENTS    : IS_USING_VEHICLE
  1527.         RELOAD_INTERUPTED_CORRECT_ATTACHMENTS    : IS_USING_TURRET
  1528.  
  1529.         //RELOAD_INTERUPTED_CORRECT_ATTACHMENTS_SECONDARYATTACK    : +ATTACK_SECONDARY
  1530.     }
  1531. }
  1532.  
  1533. state RELOAD_MG
  1534. {
  1535.     movetype legs
  1536.  
  1537.     entrycommands
  1538.     {
  1539.         viewmodelanim reload
  1540.     }
  1541.  
  1542.     action
  1543.     {
  1544.         mp44_reload            : IS_WEAPON_ACTIVE "mainhand" "StG 44"
  1545.         fg42_reload            : IS_WEAPON_ACTIVE "mainhand" "FG 42"
  1546.         mg_reload            : default
  1547.     }
  1548.  
  1549.     states
  1550.     {
  1551.         STAND                 : KILLED
  1552.         STAND                : ANIMDONE_TORSO
  1553.         RELOAD_INTERUPTED_CORRECT_ATTACHMENTS    : NEW_WEAPON
  1554.         
  1555.         RELOAD_INTERUPTED_CORRECT_ATTACHMENTS    : IS_USING_VEHICLE
  1556.         RELOAD_INTERUPTED_CORRECT_ATTACHMENTS    : IS_USING_TURRET
  1557.  
  1558.         //RELOAD_INTERUPTED_CORRECT_ATTACHMENTS_SECONDARYATTACK    : +ATTACK_SECONDARY
  1559.     }
  1560. }
  1561.  
  1562. state RELOAD_PISTOL
  1563. {
  1564.     movetype legs
  1565.  
  1566.     entrycommands
  1567.     {
  1568.         viewmodelanim reload
  1569.     }
  1570.  
  1571.     action
  1572.     {
  1573.         p38_reload            : IS_WEAPON_ACTIVE "mainhand" "Walther P38"
  1574.         histandard_reload    : IS_WEAPON_ACTIVE "mainhand" "Hi-Standard Silenced"
  1575.         pistol_reload        : default
  1576.     }
  1577.  
  1578.     states
  1579.     {
  1580.         STAND                 : KILLED
  1581.         STAND                : ANIMDONE_TORSO
  1582.         RELOAD_INTERUPTED_CORRECT_ATTACHMENTS    : NEW_WEAPON
  1583.         
  1584.         RELOAD_INTERUPTED_CORRECT_ATTACHMENTS    : IS_USING_VEHICLE
  1585.         RELOAD_INTERUPTED_CORRECT_ATTACHMENTS    : IS_USING_TURRET
  1586.  
  1587.         //RELOAD_INTERUPTED_CORRECT_ATTACHMENTS_SECONDARYATTACK    : +ATTACK_SECONDARY
  1588.     }
  1589. }
  1590.  
  1591. // start of reloading the webley revolver
  1592. state RELOAD_WEBLEY
  1593. {
  1594.     movetype legs
  1595.  
  1596.     entrycommands
  1597.     {
  1598.         viewmodelanim reload
  1599.     }
  1600.  
  1601.     action
  1602.     {
  1603.         WEBLEY_reload_start    : default
  1604.     }
  1605.  
  1606.     states
  1607.     {
  1608.         STAND                     : KILLED
  1609.         RELOAD_WEBLEY_SINGLE    : ANIMDONE_TORSO
  1610.         RELOAD_INTERUPTED        : NEW_WEAPON
  1611.         
  1612.         RELOAD_INTERUPTED        : IS_USING_VEHICLE
  1613.         RELOAD_INTERUPTED        : IS_USING_TURRET
  1614.  
  1615.         //RELOAD_INTERUPTED_SECONDARYATTACK    : +ATTACK_SECONDARY
  1616.     }
  1617. }
  1618.  
  1619. // loads in a single webley revolver bullet
  1620. state RELOAD_WEBLEY_SINGLE
  1621. {
  1622.     movetype legs
  1623.     
  1624.     entrycommands
  1625.     {
  1626.         viewmodelanim reload_single 1
  1627.     }
  1628.     
  1629.     action
  1630.     {
  1631.         WEBLEY_reload_loop            : default
  1632.     }
  1633.     
  1634.     states
  1635.     {
  1636.         STAND                             : KILLED
  1637. //        RELOAD_INTERUPTED                : NEW_WEAPON
  1638.         RELOAD_WEBLEY_END            : NEW_WEAPON
  1639.         
  1640.         RELOAD_INTERUPTED_CORRECT_ATTACHMENTS    : IS_USING_VEHICLE
  1641.         RELOAD_INTERUPTED_CORRECT_ATTACHMENTS    : IS_USING_TURRET
  1642.  
  1643.         //RELOAD_INTERUPTED_CORRECT_ATTACHMENTS_SECONDARYATTACK    : +ATTACK_SECONDARY
  1644.  
  1645.         // allow early out
  1646.         RELOAD_WEBLEY_END            : +ATTACK_PRIMARY HAS_AMMO_IN_CLIP "mainhand" !RELOAD
  1647.         RELOAD_WEBLEY_END            : PUTAWAYMAIN
  1648.         
  1649.         RELOAD_WEBLEY_CHECK_CONTINUE    : ANIMDONE_TORSO
  1650.     }
  1651. }
  1652.  
  1653. // this check to see if the webley revolver should continue reloading, or if it's done
  1654. state RELOAD_WEBLEY_CHECK_CONTINUE
  1655. {
  1656.     movetype legs
  1657.  
  1658.     entrycommands
  1659.     {
  1660.         reload // this makes the weapon want to continue reloading if it can
  1661.     }
  1662.     
  1663.     action
  1664.     {
  1665.         none                    : default
  1666.     }
  1667.     
  1668.     states
  1669.     {
  1670.         RELOAD_WEBLEY_SINGLE    : RELOAD
  1671.  
  1672. //        RELOAD_INTERUPTED        : NEW_WEAPON
  1673.         
  1674.         RELOAD_WEBLEY_END        : default
  1675.     }
  1676. }
  1677.  
  1678. // this is the end of the webley revolver reload sequence
  1679. state RELOAD_WEBLEY_END
  1680. {
  1681.     movetype legs
  1682.     
  1683.     entrycommands
  1684.     {
  1685.         viewmodelanim reload_end
  1686.         
  1687.         // just in case we interupted a bullet reload
  1688. //        correctweaponattachments
  1689.     }
  1690.     
  1691.     action
  1692.     {
  1693.         WEBLEY_reload_end    : default
  1694.     }
  1695.  
  1696.     states
  1697.     {
  1698.         STAND                     : KILLED
  1699.         STAND                     : ANIMDONE_TORSO
  1700. //        RELOAD_INTERUPTED        : NEW_WEAPON
  1701.     }
  1702. }
  1703.  
  1704. // start of reloading the nagant revolver
  1705. state RELOAD_NAGANTREV
  1706. {
  1707.     movetype legs
  1708.  
  1709.     entrycommands
  1710.     {
  1711.         viewmodelanim reload
  1712.     }
  1713.  
  1714.     action
  1715.     {
  1716.         nagantrev_reload_start    : default
  1717.     }
  1718.  
  1719.     states
  1720.     {
  1721.         STAND                     : KILLED
  1722.         RELOAD_NAGANTREV_SINGLE    : ANIMDONE_TORSO
  1723.         RELOAD_INTERUPTED        : NEW_WEAPON
  1724.         
  1725.         RELOAD_INTERUPTED        : IS_USING_VEHICLE
  1726.         RELOAD_INTERUPTED        : IS_USING_TURRET
  1727.  
  1728.         //RELOAD_INTERUPTED_SECONDARYATTACK    : +ATTACK_SECONDARY
  1729.     }
  1730. }
  1731.  
  1732. // loads in a single nagant revolver bullet
  1733. state RELOAD_NAGANTREV_SINGLE
  1734. {
  1735.     movetype legs
  1736.     
  1737.     entrycommands
  1738.     {
  1739.         viewmodelanim reload_single 1
  1740.     }
  1741.     
  1742.     action
  1743.     {
  1744.         nagantrev_reload_loop            : default
  1745.     }
  1746.     
  1747.     states
  1748.     {
  1749.         STAND                             : KILLED
  1750. //        RELOAD_INTERUPTED                : NEW_WEAPON
  1751.         RELOAD_NAGANTREV_END            : NEW_WEAPON
  1752.         
  1753.         RELOAD_INTERUPTED_CORRECT_ATTACHMENTS    : IS_USING_VEHICLE
  1754.         RELOAD_INTERUPTED_CORRECT_ATTACHMENTS    : IS_USING_TURRET
  1755.  
  1756.         //RELOAD_INTERUPTED_CORRECT_ATTACHMENTS_SECONDARYATTACK    : +ATTACK_SECONDARY
  1757.  
  1758.         // allow early out
  1759.         RELOAD_NAGANTREV_END            : +ATTACK_PRIMARY HAS_AMMO_IN_CLIP "mainhand" !RELOAD
  1760.         RELOAD_NAGANTREV_END            : PUTAWAYMAIN
  1761.         
  1762.         RELOAD_NAGANTREV_CHECK_CONTINUE    : ANIMDONE_TORSO
  1763.     }
  1764. }
  1765.  
  1766. // this check to see if the nagant revolver should continue reloading, or if it's done
  1767. state RELOAD_NAGANTREV_CHECK_CONTINUE
  1768. {
  1769.     movetype legs
  1770.  
  1771.     entrycommands
  1772.     {
  1773.         reload // this makes the weapon want to continue reloading if it can
  1774.     }
  1775.     
  1776.     action
  1777.     {
  1778.         none                    : default
  1779.     }
  1780.     
  1781.     states
  1782.     {
  1783.         RELOAD_NAGANTREV_SINGLE    : RELOAD
  1784.  
  1785. //        RELOAD_INTERUPTED        : NEW_WEAPON
  1786.         
  1787.         RELOAD_NAGANTREV_END        : default
  1788.     }
  1789. }
  1790.  
  1791. // this is the end of the nagant revolver reload sequence
  1792. state RELOAD_NAGANTREV_END
  1793. {
  1794.     movetype legs
  1795.     
  1796.     entrycommands
  1797.     {
  1798.         viewmodelanim reload_end
  1799.         
  1800.         // just in case we interupted a bullet reload
  1801. //        correctweaponattachments
  1802.     }
  1803.     
  1804.     action
  1805.     {
  1806.         nagantrev_reload_end    : default
  1807.     }
  1808.  
  1809.     states
  1810.     {
  1811.         STAND                     : KILLED
  1812.         STAND                     : ANIMDONE_TORSO
  1813. //        RELOAD_INTERUPTED        : NEW_WEAPON
  1814.     }
  1815. }
  1816.  
  1817. state RELOAD_GRENADE
  1818. {
  1819.     movetype legs
  1820.  
  1821.     entrycommands
  1822.     {
  1823.         viewmodelanim reload
  1824.     }
  1825.  
  1826.     action
  1827.     {
  1828.         steilhandgranate_reload    : IS_WEAPON_ACTIVE "mainhand" "Stielhandgranate"
  1829.         steilhandgranate_reload    : IS_WEAPON_ACTIVE "mainhand" "Nebelhandgranate"
  1830.         grenade_reload            : default
  1831.     }
  1832.  
  1833.     states
  1834.     {
  1835.         STAND                     : KILLED
  1836.         STAND                    : ANIMDONE_TORSO
  1837. //        RELOAD_INTERUPTED        : NEW_WEAPON // so quick, don't bother with interupting it
  1838.     }
  1839. }
  1840.  
  1841. state RELOAD_HEAVY
  1842. {
  1843.     movetype legs
  1844.  
  1845.     entrycommands
  1846.     {
  1847.         viewmodelanim reload
  1848.     }
  1849.  
  1850.     action
  1851.     {
  1852.         panzerschreck_reload    : IS_WEAPON_ACTIVE "mainhand" "Panzerschreck"
  1853.         bazooka_reload            : default
  1854.     }
  1855.  
  1856.     states
  1857.     {
  1858.         STAND                     : KILLED
  1859.         STAND                    : ANIMDONE_TORSO
  1860.         RELOAD_INTERUPTED_CORRECT_ATTACHMENTS    : NEW_WEAPON
  1861.         
  1862.         RELOAD_INTERUPTED_CORRECT_ATTACHMENTS    : IS_USING_VEHICLE
  1863.         RELOAD_INTERUPTED_CORRECT_ATTACHMENTS    : IS_USING_TURRET
  1864.     }
  1865. }
  1866.  
  1867.  
  1868. // start of reloading the springfield
  1869. state RELOAD_SPRINGFIELD
  1870. {
  1871.     movetype legs
  1872.  
  1873.     entrycommands
  1874.     {
  1875.         zoomoff
  1876.         viewmodelanim reload
  1877.     }
  1878.  
  1879.     action
  1880.     {
  1881.         springfield_reload_start    : default
  1882.     }
  1883.  
  1884.     states
  1885.     {
  1886.         STAND                         : KILLED
  1887.         RELOAD_SPRINGFIELD_SINGLE    : ANIMDONE_TORSO
  1888.         RELOAD_INTERUPTED            : NEW_WEAPON
  1889.         
  1890.         RELOAD_INTERUPTED    : IS_USING_VEHICLE
  1891.         RELOAD_INTERUPTED    : IS_USING_TURRET
  1892.     }
  1893. }
  1894.  
  1895. // loads in a single bullet
  1896. state RELOAD_SPRINGFIELD_SINGLE
  1897. {
  1898.     movetype legs
  1899.     
  1900.     entrycommands
  1901.     {
  1902.         viewmodelanim reload_single 1
  1903.     }
  1904.     
  1905.     action
  1906.     {
  1907.         springfield_reload_loop                : default
  1908.     }
  1909.     
  1910.     states
  1911.     {
  1912.         STAND                                 : KILLED
  1913. //        RELOAD_INTERUPTED                    : NEW_WEAPON
  1914.         RELOAD_SPRINGFIELD_END                : NEW_WEAPON
  1915.         
  1916.         RELOAD_INTERUPTED_CORRECT_ATTACHMENTS    : IS_USING_VEHICLE
  1917.         RELOAD_INTERUPTED_CORRECT_ATTACHMENTS    : IS_USING_TURRET
  1918.  
  1919.         // allow early out
  1920.         RELOAD_SPRINGFIELD_END                : +ATTACK_PRIMARY HAS_AMMO_IN_CLIP "mainhand" !RELOAD
  1921.         RELOAD_SPRINGFIELD_END                : PUTAWAYMAIN
  1922.  
  1923.         RELOAD_SPRINGFIELD_CHECK_CONTINUE    : ANIMDONE_TORSO
  1924.     }
  1925. }
  1926.  
  1927. // this check to see if the springfield should continue reloading, or if it's done
  1928. state RELOAD_SPRINGFIELD_CHECK_CONTINUE
  1929. {
  1930.     movetype legs
  1931.  
  1932.     entrycommands
  1933.     {
  1934.         reload // this makes the weapon want to continue reloading if it can
  1935.     }
  1936.     
  1937.     action
  1938.     {
  1939.         none                    : default
  1940.     }
  1941.     
  1942.     states
  1943.     {
  1944. //        RELOAD_INTERUPTED            : NEW_WEAPON
  1945.  
  1946.         RELOAD_SPRINGFIELD_SINGLE    : RELOAD
  1947.         RELOAD_SPRINGFIELD_END        : default
  1948.     }
  1949. }
  1950.  
  1951. // this is the end of the shotgun reload sequence
  1952. state RELOAD_SPRINGFIELD_END
  1953. {
  1954.     movetype legs
  1955.     
  1956.     entrycommands
  1957.     {
  1958.         viewmodelanim reload_end
  1959.  
  1960.         // just in case we interupted a shell reload
  1961. //        correctweaponattachments
  1962.     }
  1963.     
  1964.     action
  1965.     {
  1966.         springfield_reload_end    : default
  1967.     }
  1968.  
  1969.     states
  1970.     {
  1971.         STAND                     : KILLED
  1972.         STAND                     : ANIMDONE_TORSO
  1973. //        RELOAD_INTERUPTED        : NEW_WEAPON
  1974.     }
  1975. }
  1976.  
  1977.  
  1978. // start of reloading the shotgun
  1979. state RELOAD_SHOTGUN
  1980. {
  1981.     movetype legs
  1982.  
  1983.     entrycommands
  1984.     {
  1985.         viewmodelanim reload
  1986.     }
  1987.  
  1988.     action
  1989.     {
  1990.         shotgun_reload_start    : default
  1991.     }
  1992.  
  1993.     states
  1994.     {
  1995.         STAND                     : KILLED
  1996.         RELOAD_SHOTGUN_SINGLE    : ANIMDONE_TORSO
  1997.         RELOAD_INTERUPTED        : NEW_WEAPON
  1998.         
  1999.         RELOAD_INTERUPTED    : IS_USING_VEHICLE
  2000.         RELOAD_INTERUPTED    : IS_USING_TURRET
  2001.  
  2002.         //RELOAD_INTERUPTED_SECONDARYATTACK    : +ATTACK_SECONDARY
  2003.     }
  2004. }
  2005.  
  2006. // loads in a single shotgun shell
  2007. state RELOAD_SHOTGUN_SINGLE
  2008. {
  2009.     movetype legs
  2010.     
  2011.     entrycommands
  2012.     {
  2013.         viewmodelanim reload_single 1
  2014.     }
  2015.     
  2016.     action
  2017.     {
  2018.         shotgun_reload_loop                : default
  2019.     }
  2020.     
  2021.     states
  2022.     {
  2023.         STAND                             : KILLED
  2024. //        RELOAD_INTERUPTED                : NEW_WEAPON
  2025.         RELOAD_SHOTGUN_END                : NEW_WEAPON
  2026.         
  2027.         RELOAD_INTERUPTED_CORRECT_ATTACHMENTS    : IS_USING_VEHICLE
  2028.         RELOAD_INTERUPTED_CORRECT_ATTACHMENTS    : IS_USING_TURRET
  2029.  
  2030.         //RELOAD_INTERUPTED_CORRECT_ATTACHMENTS_SECONDARYATTACK    : +ATTACK_SECONDARY
  2031.  
  2032.         // allow early out
  2033.         RELOAD_SHOTGUN_END                : +ATTACK_PRIMARY HAS_AMMO_IN_CLIP "mainhand" !RELOAD
  2034.         RELOAD_SHOTGUN_END                : PUTAWAYMAIN
  2035.         
  2036.         RELOAD_SHOTGUN_CHECK_CONTINUE    : ANIMDONE_TORSO
  2037.     }
  2038. }
  2039.  
  2040. // this check to see if the shotgun should continue reloading, or if it's done
  2041. state RELOAD_SHOTGUN_CHECK_CONTINUE
  2042. {
  2043.     movetype legs
  2044.  
  2045.     entrycommands
  2046.     {
  2047.         reload // this makes the weapon want to continue reloading if it can
  2048.     }
  2049.     
  2050.     action
  2051.     {
  2052.         none                    : default
  2053.     }
  2054.     
  2055.     states
  2056.     {
  2057.         RELOAD_SHOTGUN_SINGLE    : RELOAD
  2058.  
  2059. //        RELOAD_INTERUPTED        : NEW_WEAPON
  2060.         
  2061.         RELOAD_SHOTGUN_END        : default
  2062.     }
  2063. }
  2064.  
  2065. // this is the end of the shotgun reload sequence
  2066. state RELOAD_SHOTGUN_END
  2067. {
  2068.     movetype legs
  2069.     
  2070.     entrycommands
  2071.     {
  2072.         viewmodelanim reload_end
  2073.         
  2074.         // just in case we interupted a shell reload
  2075. //        correctweaponattachments
  2076.     }
  2077.     
  2078.     action
  2079.     {
  2080.         shotgun_reload_end    : default
  2081.     }
  2082.  
  2083.     states
  2084.     {
  2085.         STAND                 : KILLED
  2086.         STAND                 : ANIMDONE_TORSO
  2087. //        RELOAD_INTERUPTED    : NEW_WEAPON
  2088.     }
  2089. }
  2090.  
  2091. state RELOAD_INTERUPTED
  2092. {
  2093.     states
  2094.     {
  2095.         STAND    : default
  2096.     }
  2097. }
  2098.  
  2099. state RELOAD_INTERUPTED_CORRECT_ATTACHMENTS
  2100. {
  2101.     entrycommands
  2102.     {
  2103.         correctweaponattachments
  2104.     }
  2105.     
  2106.     states
  2107.     {
  2108.         STAND    : default
  2109.     }
  2110. }
  2111.  
  2112. state RELOAD_INTERUPTED_SECONDARYATTACK
  2113. {
  2114.     states
  2115.     {
  2116.         CHECK_SECONDARY_ATTACK    : default
  2117.     }
  2118. }
  2119.  
  2120. state RELOAD_INTERUPTED_CORRECT_ATTACHMENTS_SECONDARYATTACK
  2121. {
  2122.     entrycommands
  2123.     {
  2124.         correctweaponattachments
  2125.     }
  2126.     
  2127.     states
  2128.     {
  2129.         CHECK_SECONDARY_ATTACK    : default
  2130.     }
  2131. }
  2132.  
  2133. //==============================================================================
  2134. //
  2135. // Death
  2136. //
  2137. //==============================================================================
  2138.  
  2139. state KILLED
  2140. {
  2141.     movetype anim
  2142.  
  2143.     entrycommands
  2144.     {
  2145.         nextpaintime -1 // allow all pain calls to work properly for death anim selection
  2146.     }
  2147.  
  2148.     states
  2149.     {
  2150.         EXPLOSION_KILLED    : PAIN_TYPE "explosion"
  2151.         EXPLOSION_KILLED    : PAIN_TYPE "grenade"
  2152.         EXPLOSION_KILLED    : PAIN_TYPE "rocket"
  2153.         KILLED_GENERIC        : default
  2154.     }
  2155. }
  2156.  
  2157. state KILLED_GENERIC
  2158. {
  2159.     states
  2160.     {
  2161.         KILLED_RUNNING        : FORWARD_VELOCITY "130"
  2162.         KILLED_CROUCHING    : POSITION_TYPE "crouching"
  2163.         KILLED_STANDING        : default
  2164.     }
  2165. }
  2166.  
  2167. state KILLED_RUNNING
  2168. {
  2169.     action
  2170.     {
  2171.         death_knockedup        : PAIN_DIRECTION "front" PAIN_THRESHOLD "50" CHANCE "30"
  2172.         death_chest        : PAIN_DIRECTION "front" PAIN_THRESHOLD "50"
  2173.         death_run        : default
  2174.     }
  2175.     
  2176.     states
  2177.     {
  2178.         KILLED_WAIT_FOR_DONE    : default
  2179.     }
  2180. }
  2181.  
  2182. state KILLED_CROUCHING
  2183. {
  2184.     action
  2185.     {
  2186.         death_frontcrouch    : PAIN_DIRECTION "rear"
  2187.         rifle_pain_kneestodeath : default
  2188.     }
  2189.  
  2190.     states
  2191.     {
  2192.         KILLED_WAIT_FOR_DONE    : default
  2193.     }
  2194. }
  2195.  
  2196. state KILLED_STANDING
  2197. {
  2198.     states
  2199.     {
  2200.         KILLED_LOWER_TORSO    : PAIN_LOCATION "pelvis"
  2201.         KILLED_LOWER_TORSO    : PAIN_LOCATION "torso_lower"
  2202.         KILLED_UPPER_TORSO    : PAIN_LOCATION "torso_mid"
  2203.         KILLED_UPPER_TORSO    : PAIN_LOCATION "torso_upper"
  2204.         KILLED_NECK        : PAIN_LOCATION "neck"
  2205.         KILLED_HEAD        : PAIN_LOCATION "head"
  2206.         KILLED_HEAD        : PAIN_LOCATION "helmet"
  2207.         KILLED_RIGHT_ARM    : PAIN_LOCATION "r_arm_upper"
  2208.         KILLED_RIGHT_ARM    : PAIN_LOCATION "r_arm_lower"
  2209.         KILLED_RIGHT_ARM    : PAIN_LOCATION "r_hand"
  2210.         KILLED_LEFT_ARM        : PAIN_LOCATION "l_arm_upper"
  2211.         KILLED_LEFT_ARM        : PAIN_LOCATION "l_arm_lower"
  2212.         KILLED_LEFT_ARM        : PAIN_LOCATION "l_hand"
  2213.         KILLED_LEG        : PAIN_LOCATION "r_leg_upper"
  2214.         KILLED_LEG        : PAIN_LOCATION "r_leg_lower"
  2215.         KILLED_LEG        : PAIN_LOCATION "r_foot"
  2216.         KILLED_LEG        : PAIN_LOCATION "l_leg_upper"
  2217.         KILLED_LEG        : PAIN_LOCATION "l_leg_lower"
  2218.         KILLED_LEG        : PAIN_LOCATION "l_foot"
  2219.  
  2220.         KILLED_UPPER_TORSO    : default
  2221.     }
  2222. }
  2223.  
  2224. state KILLED_LOWER_TORSO
  2225. {
  2226.     action
  2227.     {
  2228.         death_back            : PAIN_DIRECTION "front" CHANCE "60"
  2229.         death_knockedup        : PAIN_DIRECTION "rear" CHANCE "35"
  2230.         death_run            : PAIN_DIRECTION "rear" CHANCE "70"
  2231.         death_crotch        : CHANCE "60"
  2232.         death_chest            : default
  2233.     }
  2234.  
  2235.     states
  2236.     {
  2237.         KILLED_WAIT_FOR_DONE    : default
  2238.     }
  2239. }
  2240.  
  2241. state KILLED_UPPER_TORSO
  2242. {
  2243.     action
  2244.     {
  2245.         death_knockedup        : PAIN_DIRECTION "front" CHANCE "20"
  2246.         death_back            : PAIN_DIRECTION "front" CHANCE "60"
  2247.         death_run            : PAIN_DIRECTION "rear" CHANCE "40"
  2248.         death_frontchoke    : CHANCE "30"
  2249.         death_shoot            : CHANCE "60"
  2250.         death_chest            : default
  2251.     }
  2252.  
  2253.     states
  2254.     {
  2255.         KILLED_WAIT_FOR_DONE    : default
  2256.     }
  2257. }
  2258.  
  2259. state KILLED_NECK
  2260. {
  2261.     action
  2262.     {
  2263.         death_frontchoke    : CHANCE "50"
  2264.         death_choke            : default
  2265.     }
  2266.  
  2267.     states
  2268.     {
  2269.         KILLED_WAIT_FOR_DONE    : default
  2270.     }
  2271. }
  2272.  
  2273. state KILLED_HEAD
  2274. {
  2275.     action
  2276.     {
  2277.         death_back            : PAIN_DIRECTION "front" CHANCE "50"
  2278.         death_head_flyforward : PAIN_DIRECTION "rear" CHANCE "30"
  2279.         death_headpistol    : CHANCE "20"
  2280.         death_twist            : CHANCE "25"
  2281.         death_shoot            : CHANCE "33"
  2282.         death_fall_to_knees    : CHANCE "50"
  2283.         death_collapse        : default
  2284.     }
  2285.  
  2286.     states
  2287.     {
  2288.         KILLED_WAIT_FOR_DONE    : default
  2289.     }
  2290. }
  2291.  
  2292. state KILLED_RIGHT_ARM
  2293. {
  2294.     action
  2295.     {
  2296.         death_twist            : PAIN_DIRECTION "rear" CHANCE "50"
  2297.         death_fall_back        : CHANCE "30"
  2298.         death_shoot            : CHANCE "50"
  2299.         death_chest            : default
  2300.     }
  2301.  
  2302.     states
  2303.     {
  2304.         KILLED_WAIT_FOR_DONE    : default
  2305.     }
  2306. }
  2307.  
  2308. state KILLED_LEFT_ARM
  2309. {
  2310.     action
  2311.     {
  2312.         death_twist            : PAIN_DIRECTION "front" CHANCE "50"
  2313.         death_fall_back        : CHANCE "30"
  2314.         death_shoot            : CHANCE "50"
  2315.         death_chest            : default
  2316.     }
  2317.  
  2318.     states
  2319.     {
  2320.         KILLED_WAIT_FOR_DONE    : default
  2321.     }
  2322. }
  2323.  
  2324. state KILLED_LEG
  2325. {
  2326.     action
  2327.     {
  2328.         death_knockedup    : PAIN_DIRECTION "rear" CHANCE "50"
  2329.         death_fall_back        : CHANCE "25"
  2330.         death_shoot            : CHANCE "33"
  2331.         death_fall_to_knees    : CHANCE "50"
  2332.         death_chest            : default
  2333.     }
  2334.  
  2335.     states
  2336.     {
  2337.         KILLED_WAIT_FOR_DONE    : default
  2338.     }
  2339. }
  2340.  
  2341. //state KILLED_GENERIC
  2342. //{
  2343. //    action
  2344. //    {
  2345. //        death_crouch    : POSITION_TYPE "crouching"
  2346. //        
  2347. //        death             : default
  2348. //    }
  2349. //    
  2350. //    states
  2351. //    {
  2352. //        KILLED_WAIT_FOR_DONE    : default
  2353. //    }
  2354. //}
  2355.  
  2356. state EXPLOSION_KILLED
  2357. {
  2358.     action
  2359.     {
  2360.         death_explosion_large    : PAIN_THRESHOLD "150"
  2361. //        death_explosion_small    : PAIN_THRESHOLD "130"
  2362.         
  2363.         // directional death animations of in middle damage range
  2364. //        death_explosion_front    : PAIN_DIRECTION "rear"
  2365.         death_explosion_back    : PAIN_DIRECTION "front"
  2366.         death_explosion_left    : PAIN_DIRECTION "left"
  2367.         death_explosion_right    : PAIN_DIRECTION "right"
  2368.         
  2369.         death_explosion_small    : default // a just-in-case catch-all
  2370.     }
  2371.     
  2372.     states
  2373.     {
  2374.         KILLED_WAIT_FOR_DONE    : default
  2375.     }
  2376. }
  2377.  
  2378. state KILLED_WAIT_FOR_DONE
  2379. {
  2380.     states
  2381.     {
  2382.         KILLED_DONE        : ANIMDONE_TORSO
  2383.     }
  2384.  
  2385.     exitcommands
  2386.     {
  2387.         dead    // Frees up resources and tells everyone I'm dead.
  2388.     }
  2389. }
  2390.  
  2391. state KILLED_DONE
  2392. {
  2393.     movetype anim
  2394. }
  2395.  
  2396.  
  2397. //==============================================================================
  2398. //==============================================================================
  2399. //
  2400. // Ladder Climbing
  2401. //
  2402. //==============================================================================
  2403.  
  2404. state USE_LADDER
  2405. {
  2406.     movetype climbwall
  2407.     
  2408.     entrycommands
  2409.     {
  2410.         safeholster 1 // put our weapon away
  2411.         attachtoladder // gets the ladder we're going to be climbing
  2412.     }
  2413.     
  2414. //    action
  2415. //    {
  2416. //        none : default
  2417. //    }
  2418.     
  2419.     states 
  2420.     {
  2421. //        PUTAWAY_MAIN        : PUTAWAYMAIN
  2422.         LADDER_PUTAWAY        : PUTAWAYMAIN
  2423.         LATCH_ONTO_LADDER    : !ONGROUND 
  2424.         GET_ON_LADDER        : default
  2425.     }
  2426. }
  2427.  
  2428. state LADDER_PUTAWAY
  2429. {
  2430.     entrycommands
  2431.     {
  2432.         deactivateweapon righthand
  2433.     }
  2434.     
  2435.     states
  2436.     {
  2437.         LATCH_ONTO_LADDER    : !ONGROUND 
  2438.         GET_ON_LADDER        : default
  2439.     }
  2440. }
  2441.  
  2442. state GET_ON_LADDER
  2443. {
  2444.     movetype climbwall
  2445.  
  2446.  
  2447.     // these entry commands ensure that the player 
  2448.     // will be standing when he gets off the ladder
  2449.     entrycommands
  2450.     {
  2451.         modheight "stand"
  2452.         movementstealth "1.0"
  2453.         moveposflags "standing"
  2454.     }
  2455.  
  2456.     action
  2457.     {
  2458.         ladder_geton_top        : AT_TOP_OF_LADDER
  2459.         ladder_geton_bottom        : default
  2460.     }
  2461.     
  2462.     states
  2463.     {
  2464. //        STAND                    : KILLED
  2465.         FINISHED_GET_OFF_LADDER    : KILLED
  2466.     
  2467.         // we go to LADDER_LEFT because the left hand will be up once we're on
  2468.         LADDER_IDLE_LEFT        : ANIMDONE_TORSO
  2469.     }
  2470. }
  2471.  
  2472. // This is for when the player grabs the ladder while not on the ground
  2473. state LATCH_ONTO_LADDER
  2474. {
  2475.     movetype climbwall
  2476.  
  2477.     // these entry commands ensure that the player 
  2478.     // will be standing when he gets off the ladder
  2479.     entrycommands
  2480.     {
  2481.         modheight "stand"
  2482.         movementstealth "1.0"
  2483.         moveposflags "standing"
  2484.         tweakladderpos // make sure we're positioned properly on the ladder
  2485.     }
  2486.     
  2487.     states
  2488.     {
  2489. //        LADDER_IDLE_LEFT        : default
  2490.         LADDER_DOWN_LEFT        : default
  2491.     }
  2492. }
  2493.  
  2494. state GET_OFF_LADDER_TOP
  2495. {
  2496.     movetype climbwall
  2497.     
  2498.     action
  2499.     {
  2500.         ladder_getoff_top        : default
  2501.     }
  2502.     
  2503.     states
  2504.     {
  2505.         FINISHED_GET_OFF_LADDER    : KILLED
  2506.         
  2507.         FINISHED_GET_OFF_LADDER    : ANIMDONE_TORSO
  2508.     }
  2509. }
  2510.  
  2511. state GET_OFF_LADDER_BOTTOM
  2512. {
  2513.     movetype climbwall
  2514.     
  2515.     action
  2516.     {
  2517.         ladder_getoff_bottom    : default
  2518.     }
  2519.     
  2520.     states
  2521.     {
  2522.         FINISHED_GET_OFF_LADDER    : KILLED
  2523.     
  2524.         FINISHED_GET_OFF_LADDER    : ANIMDONE_TORSO
  2525.     }
  2526. }
  2527.  
  2528. state FINISHED_GET_OFF_LADDER
  2529. {
  2530.     movetype legs
  2531.     
  2532.     entrycommands
  2533.     {
  2534.         unattachfromladder
  2535.         safeholster 0 // pull weapon back out if we put it away to get on the ladder
  2536.     }
  2537.  
  2538.     states
  2539.     {
  2540.         STAND                    : default
  2541.     }
  2542. }
  2543.  
  2544. // same as FINISHED_GET_OFF_LADDER, except that the player is jumping off
  2545. state JUMP_OFF_LADDER
  2546. {
  2547.     movetype legs
  2548.     
  2549.     entrycommands
  2550.     {
  2551.         unattachfromladder
  2552.         safeholster 0 // pull weapon back out if we put it away to get on the ladder
  2553.         jumpxy -70 0 150
  2554.     }
  2555.  
  2556.     states
  2557.     {
  2558.         STAND            : default
  2559.     }
  2560. }
  2561.  
  2562. // idling on a ladder with the left hand high
  2563. state LADDER_IDLE_LEFT
  2564. {
  2565.     movetype climbwall
  2566.  
  2567.     entrycommands
  2568.     {
  2569. //        viewmodelanim idle
  2570.         tweakladderpos // make sure we're positioned properly on the ladder
  2571.     }
  2572.     
  2573.     action
  2574.     {
  2575.         ladder_idle_left        : default
  2576.     }
  2577.  
  2578.     states
  2579.     {
  2580. //        STAND                    : KILLED
  2581.         FINISHED_GET_OFF_LADDER    : KILLED
  2582.         
  2583.         // check for emergency getaway
  2584.         JUMP_OFF_LADDER            : +JUMP
  2585.         
  2586.         PUTAWAY_MAIN            : PUTAWAYMAIN    // just in case the weapon isn't put away yet
  2587.         
  2588.         // check for getting off top of the ladder
  2589.         GET_OFF_LADDER_TOP        : FORWARD LOOKING_UP "-30" CAN_GET_OFF_LADDER_TOP
  2590.         GET_OFF_LADDER_TOP        : BACKWARD !LOOKING_UP "-30" CAN_GET_OFF_LADDER_TOP
  2591.  
  2592.         // check for getting off bottom of the ladder
  2593.         GET_OFF_LADDER_BOTTOM    : FORWARD !LOOKING_UP "-30" CAN_GET_OFF_LADDER_BOTTOM
  2594.         GET_OFF_LADDER_BOTTOM    : BACKWARD LOOKING_UP "-30" CAN_GET_OFF_LADDER_BOTTOM
  2595.         
  2596.         LADDER_UP_RIGHT            : FORWARD LOOKING_UP "-30" CAN_CLIMB_UP_LADDER
  2597.         LADDER_UP_RIGHT            : BACKWARD !LOOKING_UP "-30" CAN_CLIMB_UP_LADDER
  2598.         
  2599.         LADDER_DOWN_LEFT        : FORWARD !LOOKING_UP "-30" CAN_CLIMB_DOWN_LADDER
  2600.         LADDER_DOWN_LEFT        : BACKWARD LOOKING_UP "-30" CAN_CLIMB_DOWN_LADDER
  2601.         
  2602. //        LADDER_SLIDE            : CROUCH
  2603.         
  2604. //        GET_OFF_LADDER            : +USE
  2605.     }
  2606. }
  2607.  
  2608. // idling on a ladder with the right hand high
  2609. state LADDER_IDLE_RIGHT
  2610. {
  2611.     movetype climbwall
  2612.     
  2613.     entrycommands
  2614.     {
  2615. //        viewmodelanim idle
  2616.         tweakladderpos // make sure we're positioned properly on the ladder
  2617.     }
  2618.     
  2619.     action
  2620.     {
  2621.         ladder_idle_right        : default
  2622.     }
  2623.     
  2624.     states
  2625.     {
  2626. //        STAND                    : KILLED
  2627.         FINISHED_GET_OFF_LADDER    : KILLED
  2628.     
  2629.         // check for emergency getaway
  2630.         JUMP_OFF_LADDER            : +JUMP
  2631.         
  2632.         PUTAWAY_MAIN            : PUTAWAYMAIN    // just in case the weapon isn't put away yet
  2633.         
  2634.         // check for getting off top of the ladder
  2635.         GET_OFF_LADDER_TOP        : FORWARD LOOKING_UP "-30" CAN_GET_OFF_LADDER_TOP
  2636.         GET_OFF_LADDER_TOP        : BACKWARD !LOOKING_UP "-30" CAN_GET_OFF_LADDER_TOP
  2637.  
  2638.         // check for getting off bottom of the ladder
  2639.         GET_OFF_LADDER_BOTTOM    : FORWARD !LOOKING_UP "-30" CAN_GET_OFF_LADDER_BOTTOM
  2640.         GET_OFF_LADDER_BOTTOM    : BACKWARD LOOKING_UP "-30" CAN_GET_OFF_LADDER_BOTTOM
  2641.         
  2642.         LADDER_UP_LEFT            : FORWARD LOOKING_UP "-30" CAN_CLIMB_UP_LADDER
  2643.         LADDER_UP_LEFT            : BACKWARD !LOOKING_UP "-30" CAN_CLIMB_UP_LADDER
  2644.         
  2645.         LADDER_DOWN_RIGHT        : FORWARD !LOOKING_UP "-30" CAN_CLIMB_DOWN_LADDER
  2646.         LADDER_DOWN_RIGHT        : BACKWARD LOOKING_UP "-30" CAN_CLIMB_DOWN_LADDER
  2647.         
  2648. //        LADDER_SLIDE            : CROUCH
  2649.  
  2650. //        GET_OFF_LADDER            : +USE
  2651.     }
  2652. }
  2653.  
  2654. state LADDER_UP_LEFT
  2655. {
  2656.     movetype climbwall
  2657.     
  2658.     entrycommands
  2659.     {
  2660. //        tweakladderpos // make sure we're positioned properly on the ladder
  2661.     }
  2662.     
  2663.     action
  2664.     {
  2665.         ladder_up_left            : default
  2666.     }
  2667.     
  2668.     states
  2669.     {
  2670. //        STAND                    : KILLED
  2671.         FINISHED_GET_OFF_LADDER    : KILLED
  2672.         
  2673. //        LADDER_SLIDE            : CROUCH
  2674.         
  2675.         // check for emergency getaway
  2676.         JUMP_OFF_LADDER            : +JUMP
  2677.         
  2678.         LADDER_IDLE_LEFT        : ANIMDONE_TORSO
  2679.     }
  2680. }
  2681.  
  2682. state LADDER_UP_RIGHT
  2683. {
  2684.     movetype climbwall
  2685.     
  2686.     entrycommands
  2687.     {
  2688. //        tweakladderpos // make sure we're positioned properly on the ladder
  2689.     }
  2690.     
  2691.     action
  2692.     {
  2693.         ladder_up_right            : default
  2694.     }
  2695.     
  2696.     states
  2697.     {
  2698. //        STAND                    : KILLED
  2699.         FINISHED_GET_OFF_LADDER    : KILLED
  2700.         
  2701. //        LADDER_SLIDE            : CROUCH
  2702.         
  2703.         // check for emergency getaway
  2704.         JUMP_OFF_LADDER            : +JUMP
  2705.         
  2706.         LADDER_IDLE_RIGHT        : ANIMDONE_TORSO
  2707.     }
  2708. }
  2709.  
  2710. state LADDER_DOWN_LEFT
  2711. {
  2712.     movetype climbwall
  2713.     
  2714.     entrycommands
  2715.     {
  2716. //        tweakladderpos // make sure we're positioned properly on the ladder
  2717.     }
  2718.     
  2719.     action
  2720.     {
  2721.         ladder_down_left        : default
  2722.     }
  2723.     
  2724.     states
  2725.     {
  2726. //        STAND                    : KILLED
  2727.         FINISHED_GET_OFF_LADDER    : KILLED
  2728.         
  2729. //        LADDER_SLIDE            : CROUCH
  2730.         
  2731.         // check for emergency getaway
  2732.         JUMP_OFF_LADDER            : +JUMP
  2733.         
  2734.         LADDER_IDLE_RIGHT        : ANIMDONE_TORSO
  2735.     }
  2736. }
  2737.  
  2738. state LADDER_DOWN_RIGHT
  2739. {
  2740.     movetype climbwall
  2741.     
  2742.     entrycommands
  2743.     {
  2744. //        tweakladderpos // make sure we're positioned properly on the ladder
  2745.     }
  2746.     
  2747.     action
  2748.     {
  2749.         ladder_down_right        : default
  2750.     }
  2751.     
  2752.     states
  2753.     {
  2754. //        STAND                    : KILLED
  2755.         FINISHED_GET_OFF_LADDER    : KILLED
  2756.         
  2757. //        LADDER_SLIDE            : CROUCH
  2758.         
  2759.         // check for emergency getaway
  2760.         JUMP_OFF_LADDER            : +JUMP
  2761.         
  2762.         LADDER_IDLE_LEFT        : ANIMDONE_TORSO
  2763.     }
  2764. }
  2765.  
  2766. state LADDER_SLIDE
  2767. {
  2768.     movetype climbwall
  2769.     
  2770.     action
  2771.     {
  2772.         ladder_slide            : default
  2773.     }
  2774.     
  2775.     states
  2776.     {
  2777. //        STAND                    : KILLED
  2778.         FINISHED_GET_OFF_LADDER    : KILLED
  2779.         
  2780.         // check for emergency getaway
  2781.         FINISHED_GET_OFF_LADDER    : +JUMP
  2782.         
  2783.         FINISHED_GET_OFF_LADDER    : ONGROUND
  2784.         LADDER_IDLE_LEFT        : !CROUCH
  2785.     }
  2786. }
  2787.  
  2788. //==============================================================================
  2789. //==============================================================================
  2790. //
  2791. // Generic Use
  2792. //
  2793. //==============================================================================
  2794.  
  2795. state GENERIC_USE
  2796. {
  2797.     entrycommands
  2798.     {
  2799.         usestuff
  2800.     }
  2801.  
  2802.     states
  2803.     {
  2804.         STAND    : default
  2805.     }
  2806. }
  2807.  
  2808.  
  2809. //==============================================================================
  2810. //==============================================================================
  2811. //
  2812. // Vehicles
  2813. //
  2814. //==============================================================================
  2815.  
  2816. state VEHICLE_PUTAWAY
  2817. {
  2818.     entrycommands
  2819.     {
  2820.         deactivateweapon righthand
  2821.     }
  2822.     
  2823.     states
  2824.     {
  2825.         VEHICLE_IDLE    : default
  2826.     }
  2827. }
  2828.  
  2829. state VEHICLE_START
  2830. {
  2831. //    movetype anim
  2832.     
  2833. //    action
  2834. //    {
  2835. //        vehicle_idle            : default
  2836. //    }
  2837.     
  2838.     states
  2839.     {
  2840.         VEHICLE_PUTAWAY    : PUTAWAYMAIN    // Basic put weapon away move.
  2841.         VEHICLE_IDLE    : default
  2842.     }
  2843. }
  2844.  
  2845. state VEHICLE_TURRET_IDLE
  2846. {
  2847.     entrycommands
  2848.     {
  2849.         modheight "duck"
  2850.         moveposflags "crouching"
  2851.     }
  2852.  
  2853.     exitcommands
  2854.     {
  2855.         modheight "stand"
  2856.         moveposflags "standing"
  2857.     }
  2858.  
  2859.     movetype anim
  2860.     
  2861.     action
  2862.     {
  2863.         aagun_idle    : VEHICLE_TYPE "aagun"
  2864.         flak88_idle    : VEHICLE_TYPE "flak88"
  2865.         nebelwerfer_idle : VEHICLE_TYPE "nebelwerfer"
  2866.         granatwerfer_idle : VEHICLE_TYPE "granatwerfer"
  2867.         vehicle_idle    : default
  2868.     }
  2869.     
  2870.     states
  2871.     {
  2872.         VEHICLE_USE        : +USE
  2873.         STAND            : !IS_USING_VEHICLE
  2874.     }
  2875. }
  2876.  
  2877. state VEHICLE_NORMAL_IDLE
  2878. {
  2879.     movetype anim
  2880.     
  2881.     action
  2882.     {
  2883.         vehicle_idle    : default
  2884.     }
  2885.     
  2886.     states
  2887.     {
  2888.         VEHICLE_USE        : +USE
  2889.         STAND            : !IS_USING_VEHICLE
  2890.     }
  2891. }
  2892.  
  2893.  
  2894. state VEHICLE_IDLE
  2895. {
  2896.     states
  2897.     {
  2898.         VEHICLE_TURRET_IDLE    : VEHICLE_TYPE "aagun"
  2899.         VEHICLE_TURRET_IDLE    : VEHICLE_TYPE "flak88"
  2900.         VEHICLE_TURRET_IDLE    : VEHICLE_TYPE "nebelwerfer"
  2901.         VEHICLE_TURRET_IDLE    : VEHICLE_TYPE "granatwerfer"
  2902.         VEHICLE_NORMAL_IDLE    : default
  2903.     }
  2904. }
  2905.  
  2906. state VEHICLE_USE
  2907. {
  2908.     movetype anim
  2909.  
  2910. //    entrycommands
  2911. //    {
  2912. //        usestuff
  2913. //    }
  2914.  
  2915.     action
  2916.     {
  2917.         vehicle_idle            : default
  2918.     }
  2919.  
  2920.     states
  2921.     {
  2922.         VEHICLE_IDLE    : default
  2923.     }
  2924. }
  2925.  
  2926.  
  2927. //==============================================================================
  2928. //==============================================================================
  2929. //
  2930. // Turrets
  2931. //
  2932. //==============================================================================
  2933.  
  2934. state TURRET_PUTAWAY
  2935. {
  2936.     entrycommands
  2937.     {
  2938.         deactivateweapon righthand
  2939.     }
  2940.     
  2941.     states
  2942.     {
  2943.         TURRET_IDLE        : default
  2944.     }
  2945. }
  2946.  
  2947. state TURRET_START
  2948. {
  2949. //    movetype anim
  2950.     
  2951. //    action
  2952. //    {
  2953. //        turret_idle        : default
  2954. //    }
  2955.     
  2956.     states
  2957.     {
  2958.         TURRET_PUTAWAY    : PUTAWAYMAIN    // Basic put weapon away move.
  2959.         TURRET_IDLE        : default
  2960.     }
  2961. }
  2962.  
  2963. state TURRET_IDLE
  2964. {
  2965.     movetype anim
  2966.     
  2967.     action
  2968.     {
  2969.         mg42tripod_crouch_aim_straight_straight    : IS_WEAPON_ACTIVE "mainhand" "Packed MG42 Turret"
  2970.         turret_idle        : default
  2971.     }
  2972.     
  2973.     states
  2974.     {
  2975. //        TURRET_USE        : +USE
  2976. //        GENERIC_USE        : +USE
  2977.         STAND            : !IS_USING_TURRET
  2978.     }
  2979. }
  2980.  
  2981. //state TURRET_USE
  2982. //{
  2983. //    movetype anim
  2984. //
  2985. //    entrycommands
  2986. //    {
  2987. //        usestuff
  2988. //    }
  2989. //
  2990. //    action
  2991. //    {
  2992. //        turret_idle        : default
  2993. //    }
  2994. //
  2995. //    states
  2996. //    {
  2997. //        TURRET_IDLE    : default
  2998. //    }
  2999. //}
  3000.  
  3001.